• how to set up wordpress website on local computer
    Le Papillon

    how to set up wordpress website on local computer

    Of course! Setting up a WordPress website on your local computer is an excellent way to learn, test themes/plugins, or build a site before it goes live. This local environment is often called a “local server” or “development environment.”

    Here’s a comprehensive guide on how to do it.


    Overview: The Two Main Methods

    There are two primary ways to set up WordPress locally. I highly recommend Method 1 for beginners.

    1. Using a Local Server Tool (Easiest & Recommended): Software like Local, XAMPP, or MAMP automates the entire process. They create a mini-server environment on your PC with all the necessary components (Apache, PHP, MySQL).
    2. Manual Installation (Advanced): Installing and configuring the web server (like Apache), PHP, and database (like MySQL) individually. This offers more control but is complex.

    Method 1: Using Local by Flywheel (The Easiest Way)

    Local is a free, modern, and very user-friendly tool designed specifically for WordPress. It works on Windows, Mac, and Linux.

    Step-by-Step Guide with Local

    Step 1: Download and Install Local

    • Go to the Local website.
    • Download the free version for your operating system.
    • Run the installer and follow the simple on-screen instructions.

    Step 2: Create a New Site

    • Open Local and click “Create a new site.”
    • You’ll be guided through a simple setup wizard:
      • Site Name: Enter a name for your development site (e.g., my-test-site). This will also be your local domain (e.g., my-test-site.local).
      • Environment: Choose “Preferred” for the best balance of performance and ease of use.
      • Setup: For your first site, choose “Create a new WordPress site.”
      • WordPress Username/Password: Set your admin username and password. Write these down! You’ll need them to log into your WordPress dashboard.

    Step 3: Start Your Site

    • After you click “Add Site,” Local will automatically download the necessary files, set up the database, and configure everything.
    • Once the process is complete, your site will appear in the Local dashboard. Click “Start Site” to run your local server.

    Step 4: Access Your Site and Dashboard

    • Your local WordPress site will now be running. You can access it in two ways:
      • The Front End (Your Website): Click the “Open Site” button in Local. It will open in your browser (e.g., http://my-test-site.local).
      • The Back End (WP Admin): Click the “Admin” button in Local. It will take you directly to your WordPress login page (http://my-test-site.local/wp-admin). Log in with the username and password you created in Step 2.

    Congratulations! You now have a fully functional WordPress website running on your computer.


    Method 2: Using XAMPP (A Traditional Alternative)

    XAMPP is a free, all-in-one package containing Apache (web server), MySQL (database), and PHP. It’s very powerful but requires a few more manual steps.

    Step-by-Step Guide with XAMPP

    Step 1: Download and Install XAMPP

    • Go to the Apache Friends XAMPP page.
    • Download the version for your operating system.
    • Run the installer. It’s best to install it to a simple folder like C:\xampp (Windows) or Applications/XAMPP (Mac).

    Step 2: Start the Servers

    • Open the XAMPP Control Panel.
    • Start the Apache and MySQL modules by clicking the “Start” button next to them. A green indicator will show they are running.

    Step 3: Download WordPress

    • Go to wordpress.org/download and download the latest version of WordPress.
    • Unzip the downloaded file. You will get a folder named wordpress.
    • Move this wordpress folder into your XAMPP’s htdocs directory (e.g., C:\xampp\htdocs\).
    • You can rename the wordpress folder to whatever you want your site’s folder to be called (e.g., mysite).

    Step 4: Create a Database

    • In your web browser, go to http://localhost/phpmyadmin.
    • Click on the “Databases” tab.
    • Enter a name for your new database (e.g., mysite_db) and click “Create.” Remember this name.

    Step 5: Run the WordPress Installation

    • In your browser, go to http://localhost/mysite (replace mysite with the name of the folder you created in Step 3).
    • You will see the famous WordPress installation screen.
    • Select your language and click “Continue.”
    • WordPress will now show you the information it needs. Click “Let’s go!”
    • Fill in the database details:
      • Database Name: The name you created (e.g., mysite_db).
      • Username: root
      • Password: (Leave this field blank)
      • Database Host: localhost
      • Table Prefix: wp_ (you can leave this as default).
    • Click “Submit.” If the connection is successful, click “Run the installation.”
    • Finally, enter your Site Title, Username, Password, and Email for the WordPress admin account. Click “Install WordPress.”

    Step 6: Log In

    • After installation, you can log in at http://localhost/mysite/wp-admin with the username and password you just created.

    Why Set Up a Local WordPress Site?

    • Safe Testing: Test new themes, plugins, and WordPress updates without breaking your live website.
    • Development: Build websites for clients offline.
    • Learning: Experiment with code (HTML, CSS, PHP) without any risk.
    • Speed: Everything runs on your machine, so it’s incredibly fast.

    What To Do When You’re Ready to Go Live?

    When your local site is ready for the world, you will need to “migrate” it to a live web hosting server. This process involves:

    1. Buying web hosting and a domain name.
    2. Exporting your local database.
    3. Uploading your WordPress files to the host.
    4. Importing the database on the host.
    5. Updating configuration files.

    Many plugins (like Duplicator or All-in-One WP Migration) and the Local software itself have tools to make this migration process much easier.

    For almost all users, starting with “Local by Flywheel” is the fastest, simplest, and most reliable method.


    Comment

    We are glad you have chosen to leave a comment. Please keep in mind that comments are moderated according to our comment policy .
    Posting comment on "how to set up wordpress website on local computer"
    1 2 3 4 5
    Thank you for your comment.

    There is no comment for this post currently,
    be the first one to write a comment.

    Le Papillon

    Author Rank: 10
    Author's Name: kk Zhang
    User ID: 10000325
    Number of posts published by user: 4


    Related     Posts
    No image
    04/24/2026  |  
    how to host google font locally for my wordpress online website

    Hosting Google Fonts locally on your WordPress site is an excellent way to boost your site’s performance, improve privacy compliance (like GDPR), and give you more control over
    » » » »

    No image
    04/22/2026  |  
    use oracle cloud free instance to set up a wordpress website step by step instruction

    Setting up a WordPress website on Oracle Cloud’s free tier is a great way to build a site with no upfront costs. The process involves setting up your
    » » » »

    No image
    04/21/2026  |  
    after setting up my wordpress website on local computer, how to make it accessible to the public user and public user is able to preview the wordpress website locally built on my personal computer? pros and cons?

    Making your locally-built WordPress site accessible to the public is a common next step for sharing your work or getting client feedback. There are two main paths you
    » » » »

    03/21/2022  |  
    在甲骨文 Oracle Cloud 上搭建永久免费 WordPress 网站

    Key tasks include how to: Free Tier: Install WordPress on an Ubuntu Instance https://docs.oracle.com/en-us/iaas/developer-tutorials/tutorials/wp-on-ubuntu/01-summary.htm

    No image
    01/21/2021  |  
    模板问题

    参考 外观–》 自定义–》主页设置–》主页名 主页名 -> Setting -> CONTENT LAYOUT -> 100% Full Width The Menus Screen enables the user to create a custom menu (also known as a
    » » » »

    No image
    12/10/2020  |  
    有关主机地区的问题

    在使用云服务器的时候 一开始会有主机地区选择 有些同学可能会选择主机地区在国内 觉得自己的网站对象是国内用户 或者有些同学不是使用云服务器 是选择使用我们大家经常用的主机托管公司 主机提供商很多了 像Blue Host, Hostgator, GoDaddy等等 界面友好 不像谷歌云和阿里云这样子我们需要自己打入LINUX的指令 在选择主机地区的时候 如果你是打算搭建WordPress网站 最好主机地区不要选择在国内大陆 虽然WordPress是开源的 在国内使用访问登录没有问题 但是因为你所选择的WordPress主题或者插件可能会用到Google的产品 像Google Font, Google Map等等 或者会用到其他被禁的产品 我不知道JQuery是不是也在国内禁用 JQuery是大多数WordPress主题都会用到的JavaScript代码库 如果你的主机放在国内 你所选择的WordPress主题需要的这些的文件和程序可能拿取不到
    » » » »

    No image
    12/08/2020  |  
    使用all in one wp migration不可以导出网站

    Introduced in 2013 and used by over 60 million websites, All-in-One WP Migration is verifiably one of WordPress’ most trusted and utilized plugins for moving websites with absolute
    » » » »

    No image
    12/07/2020  |  
    想用all in one wp migration迁移WordPPress网站 文件大于512M

    When building websites, we tend to create a site locally or on a development server and then migrate the site on the client’s server when done. The All
    » » » »

    No image
    12/07/2020  |  
    谷歌云搭建的WordPress登录密码忘记了 收不到邮件恢复密码

    Why Add an Admin User to the WordPress Database via MySQL?We once ran into an issue where a user’s site was hacked, and their admin account was deleted
    » » » »

    No image
    12/07/2020  |  
    Elementor在使用过程中有问题

    Create a WebsiteDesign Your FuturePower your vision with Elementor to build, manage and host stunning websites!We’ve got you covered from A-to-Z with the #1 website platform for WordPress.
    » » » »

    No image
    12/07/2020  |  
    Screen Options不可以下拉

    Screen Options is a fly down menu button located on the top right corner of some pages in your WordPress admin area. When clicked, Screen Options menu shows
    » » » »

    No image
    12/07/2020  |  
    阿里云分国际和国内版?

    Alibaba Cloud is more of an International Entity subsidiary of Alibaba Group which is still in the progress of porting of all the services from Aliyun with enhancements.
    » » » »

    No image
    12/07/2020  |  
    SSL 安全证书

    DescriptionReally Simple SSL will automatically configure your website to use SSL to its fullest potential. Use extra security features to protect your website, and use our server health
    » » » »

    12/06/2020  |  
    谷歌云 – 用完300元试用赠金或者没有用完?

    Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that provides a series of modular cloud services including computing, data storage, data analytics,
    » » » »