How to Set Up WordPress on a Local Machine (Step-by-Step Guide)

How to Set Up WordPress Locally on Your Computer – WPDebugging.com

Setting up a local environment is essential for developing and testing WordPress websites safely on your computer. LocalWP (formerly Local by Flywheel) is one of the easiest tools for this. This guide walks you through the entire setup process on a Windows machine.

What You’ll Need

Before we start, make sure you have:

  1. A computer with internet access.
  2. At least 4 GB of RAM for better performance.
  3. Admin access to install software.

Download and Install LocalWP

Go to the official website:
Visit https://localwp.com

Download for Windows:
Click “Download for Free” and select Windows as your platform.

Run the Installer:
After downloading the .exe file, double-click to run it and follow the on-screen instructions.

Complete the Setup:
Let the installation complete. Once done, open LocalWP.

You can locate it under your browser’s downloads.

Double-click on the downloaded software to execute it.

You can select if you wish to allow only the current user or all the users on the Windows machine.

Choose your desire location to install the localWP setup, but I would suggest keeping the default until it is necessary to change the location.

After running localWP, it will ask you to enable error reporting. Turn it on as shown in the screenshot below.

Create a New WordPress Site

Launch LocalWP:
Open the app and click on the “+ Create a New Site” button.

Choose the fresh installation as we will learn how to set up the theme, plugins, etc.

Name Your Site:
Choose a name (e.g., dev-site.com). This will also be used as your local domain.

Choose Environment (Optional):
You can go with the Preferred setup (recommended for beginners) or choose Custom to define PHP version, web server (NGINX/Apache), and database type.

I would suggest choosing Apache, as most of the hosting companies still use Apache in their web stack, and it will also help to play around with the .htaccess

Set WordPress Username and Password:
Fill in your WordPress admin username, password, and email. From the advanced section, select your preferred language and Multisite=No
Click Add Site.

Access Your Local WordPress Site

Once the setup completes:

  • Click “Open Site” to view your site in a browser.
  • Click “WP Admin” to log in to the WordPress dashboard using the credentials you just set.

Managing Your Local Sites

LocalWP gives you control over each WordPress site:

  • Start/Stop site servers
  • Change PHP or database settings
  • Export or clone the site
  • Open the site folder on your machine

You can access these options by selecting a site from the Local dashboard.

Tips for Development

Use Adminer or TablePlus (from Local’s sidebar) to manage the database.
Add plugins and themes just like a live site.
Test updates safely without affecting your live website.

Open Your Terminal

On Windows, open Command Prompt or PowerShell.
On macOS/Linux, open the Terminal.

I would suggest installing GitBash, which will feel more convenient to use, along with the Debian base support commands that will also help you to learn basic navigation commands for Debian-based operating Systems.

Switching Default Terminal in LocalWP

However, for a more flexible and Unix-like experience, especially if you’re working with Debian-based servers, it’s recommended to switch to Git Bash. You can do this by going to LocalWP > Preferences > Terminal and selecting Git Bash as your default shell. This setup closely mirrors the command structure you’ll use when managing remote servers, making it easier to adapt and navigate directories effectively.

Check WP-CLI Installation

Execute the following command:

wp --info

You should see information like WP-CLI, PHP, Operating System, and other details. If this works as shown in the screenshot below, you’re ready to go!

Troubleshooting Common Issues

Ports already in use: Try changing ports in the Local settings, and each port should use a different port.
Site not loading: Restart the Local app and try again.
Admin login not working: Reset credentials from the Local dashboard.

Conclusion

Setting up a local WordPress environment with LocalWP on Windows is a quick and user-friendly way to start building and testing WordPress sites. It’s especially helpful for developers and beginners who want a safe space to experiment without affecting a live site.

Whether you’re troubleshooting common issues like port conflicts or admin login errors, LocalWP provides easy tools to get you back on track. Once you’re set up, you’ll have a powerful environment ready for development, testing themes or plugins, and learning advanced tools like WP-CLI.

Next Article

What Is WP-CLI? Why WordPress Users Should Learn This Command Line Tool

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *