Biggest deals of the year. 30-day money-back guarantee. Limited time deals. 24/7 support. Don't miss out

How to install WordPress locally on Windows, macOS, and Linux

Oct 27, 2026 / 5 min Read
By Will M.

You can install WordPress locally on Windows, macOS, or Linux using a free development environment such as WampServer, MAMP, or XAMPP. These tools let you run WordPress directly on your computer, so you can build websites, test plugins, and troubleshoot issues without affecting a live site.

The setup involves installing a local server, creating a database, and running the WordPress installer. Below, we’ll compare the available tools and walk through the installation steps for each operating system.

Which tool should you use to install WordPress locally?

The best tool for installing WordPress locally depends on your operating system and how much control you need over the development environment. LocalWP is generally the easiest choice for beginners, while WampServer, MAMP, and XAMPP are useful when you want to manage the local server and database yourself.

Here’s how the available options compare:

ToolOperating systemBest for
WampServerWindowsSetting up WordPress with a traditional local server stack
MAMPmacOS, WindowsManaging Apache or Nginx, PHP, and databases through a desktop interface
XAMPPWindows, macOS, LinuxLearning how to configure a local web server and database
LocalWP (Local)Windows, macOS, supported Linux distributionsCreating WordPress sites with minimal manual configuration
DockerWindows, macOS, LinuxBuilding reproducible development environments using containers
WordPress PlaygroundWeb browserQuickly testing WordPress without installing a desktop server

A local installation follows the same basic WordPress setup process as a hosted installation, but the web server and database run on your own computer rather than a hosting provider’s server.

For a traditional setup, choose WampServer on Windows, MAMP on macOS, or XAMPP on Linux. These tools give you direct access to the components WordPress needs, including PHP and a database.

If you prefer a simpler approach, LocalWP automates much of the installation process. Developers who need control over their environment can use Docker, while WordPress Playground is convenient for quick browser-based experiments. Playground also supports saving or exporting your work, although it isn’t a full replacement for every local server setup.

How to install WordPress locally on Windows using WampServer

To install WordPress locally on Windows, you can use WampServer, a free development environment that includes Apache, PHP, and MySQL or MariaDB. It provides the server components needed to run WordPress on your computer without purchasing web hosting.

Follow these steps:

  1. Download and install WampServer. Visit the official WampServer website and download the 64-bit version compatible with your Windows system. Run the installer and follow the setup instructions. Install any required Visual C++ components if prompted.
  2. Launch WampServer. Open the application from the Windows Start menu. Check the WampServer icon in the system tray. A green icon indicates that the required services are running.
  3. Create a WordPress database. Open http://localhost/phpmyadmin/ in your browser. Sign in using the credentials configured for your local database server, then select Databases and create a new database named wordpress_local. Creating a new database.
  4. Download WordPress. Get the latest WordPress package from WordPress.org, extract the ZIP file, and copy the WordPress folder into WampServer’s web root directory, typically C:wamp64www. Rename the folder mytestingsite.
  5. Run the WordPress installer. Open http://localhost/mytestingsite/ in your browser. Select your language and enter the database name wordpress_local, your local database username and password, and the database host localhost.
  6. Complete the installation. Enter your website title, administrator username, password, and email address. Click Install WordPress, then sign in at http://localhost/mytestingsite/wp-admin/.WordPress installation screen to insert the website information, including site title, username, and password

Your WordPress website is now running locally on Windows. You can install themes, test plugins, and make changes without affecting a live website.

How to install WordPress locally on macOS using MAMP

You can install WordPress locally on macOS using MAMP, a development environment that includes a web server, PHP, and a database server. The free version provides the components needed to create and test a WordPress website on your Mac.

Follow these steps:

  1. Download and install MAMP. Visit the official MAMP website and download the version compatible with your Mac. Open the installer and complete the installation process.
  2. Start the MAMP servers. Open MAMP from your Applications folder and start the servers. By default, MAMP uses port 8888 for Apache and 8889 for MySQL. You can keep these settings unless another application is using the same ports.The Ports tab under the MAMP Preferences.
  3. Download WordPress. Download the latest WordPress package from WordPress.org and extract it. Copy the WordPress folder into /Applications/MAMP/htdocs/ and rename it mytestingsite.
  4. Create a database. In MAMP, click WebStart and open phpMyAdmin from the Tools menu. Create a new database named wordpress_local.The Databases tab on your phpMyAdmin.
  5. Run the WordPress installer. Open http://localhost:8888/mytestingsite/ in your browser. Select your language, then enter the database name wordpress_local. For an unchanged default MAMP installation, the database username and password are both root, and the database host is localhost.
  6. Complete the WordPress setup. Enter your website title, administrator credentials, and email address. Click Install WordPress, then sign in to your local dashboard at http://localhost:8888/mytestingsite/wp-admin/.WordPress installation screen to insert the website information, including site title, username, and password

You can now use your local WordPress website to test themes, plugins, and configuration changes before applying them to a live site.

How to install WordPress locally on Linux using XAMPP

To install WordPress locally on Linux, you can use XAMPP, a free software package that includes Apache, MariaDB, PHP, and phpMyAdmin. It provides the server environment WordPress needs without requiring you to configure each component separately.

The following steps apply to Linux distributions compatible with the official XAMPP Linux installer.

  1. Download XAMPP for Linux. Visit the Apache Friends website and download the Linux installer compatible with your system.The different XAMPP versions available to download.
  2. Install XAMPP. Open your terminal, navigate to the directory containing the downloaded installer, and make the file executable by running chmod +x xampp-linux-*-installer.run. Then launch it using sudo ./xampp-linux-*-installer.run and complete the installation wizard.
  3. Start the local server. Run sudo /opt/lampp/lampp start in your terminal. This starts XAMPP’s Apache and MariaDB services. Open http://localhost in your browser to confirm that the server is working.
  4. Download and copy WordPress. Download the latest WordPress package from WordPress.org and extract it. Copy the extracted wordpress directory into /opt/lampp/htdocs/, renaming the copied directory mytestingsite. Because this directory is normally protected, use administrator privileges to copy the files and ensure your local user can edit the new site directory.
  5. Create a WordPress database. Open http://localhost/phpmyadmin/ in your browser. Select Databases and create a new database named wordpress_local. Creating databases on your phpMyAdmin and labelling the second drop-down menu as collation.
  6. Run the WordPress installer. Visit http://localhost/mytestingsite/ and choose your preferred language. Enter wordpress_local as the database name and localhost as the database host. If you haven’t changed XAMPP’s default database credentials, use root as the username and leave the password field empty.
  7. Complete the setup. Enter your WordPress site title, administrator username, password, and email address. Click Install WordPress, then log in at http://localhost/mytestingsite/wp-admin/.WordPress installation screen to insert the website information, including site title, username, and password in the second method of installation

Important: XAMPP is intended for local development, not public production servers. Its default configuration includes settings that aren’t secure for internet-facing websites. Keep the environment accessible only from your trusted local machine.

Once you’ve finished working, you can stop the XAMPP services with sudo /opt/lampp/lampp stop.

Why install WordPress locally?

Installing WordPress locally lets you develop, customize, and troubleshoot a website without affecting a live site. It’s especially useful for experimenting with themes, plugins, and code before publishing changes.

The main benefits include:

  • Safe testing: Try WordPress updates, plugins, and theme changes without affecting visitors.
  • Offline development: Work on your website without an active internet connection once the required software and resources are installed locally.
  • Learning and experimentation: Practice working with WordPress files, databases, and PHP in a private environment.
  • Free development: Build and test a WordPress website without purchasing hosting or registering a domain.

If you’re testing changes to an existing website, a local environment may not fully reproduce its live server configuration. A separate WordPress staging environment can provide a more representative environment for final compatibility checks before publishing.

How to move your local WordPress site to a live server

Once you’ve finished developing and testing WordPress locally, you can make your website accessible to visitors by moving it to a hosting server.

This typically involves transferring your WordPress files and database, updating the database connection details, and replacing local URLs with your public domain. The exact process depends on your hosting provider and whether you use a migration plugin or transfer the files manually.

Before publishing, make sure to:

  • Back up your local website, including its files and database.
  • Check server compatibility to ensure your hosting environment supports the PHP version and WordPress requirements.
  • Update your website URLs so links and media no longer reference localhost.

A migration plugin can simplify the process of transferring your WordPress files and database to the new server.

Once the website is online, test its pages, navigation, plugins, and forms to confirm everything works as expected.

This article is a localized version of How to install WordPress locally on Windows, macOS, and Linux, originally published in English.

Will Morris is a staff writer at WordCandy. When he's not writing about WordPress, he likes to gig his stand-up comedy routine on the local circuit.

Trusted by 4+ million website owners worldwide

See our 73,633 reviews on Trustpilot