Tutorials

How to Install WordPress Locally on Windows or Mac?

• • 21 min read

Installing WordPress locally means running a complete WordPress site on your own computer — no hosting, no domain, no internet required. Every serious developer does this before touching a live site. It keeps mistakes private, speeds up testing dramatically, and lets you experiment with themes, plugins, and custom code without risking a production environment. This guide covers three proven methods to install WordPress locally on Windows or Mac, plus a ranked breakdown of every major local development tool worth using in 2026.

Whether the goal is to build a brand-new site from scratch, test a major plugin update, or learn WordPress development without consequences, a local environment is the right starting point. The setup takes under ten minutes with the right tool.

Why Install WordPress Locally Instead of Using a Staging Server

A local environment runs entirely on your machine, which means zero latency, no bandwidth costs, and no exposure to search engines or users. Changes appear instantly in the browser without waiting for a server response from another continent. For plugin and theme developers, this is the only practical way to work.

Staging servers are useful for final pre-launch checks, but they cost money and require an internet connection. A local WordPress install costs nothing extra and works offline on a plane, a train, or anywhere connectivity is unreliable. Most professional WordPress developers maintain a local environment as their primary workspace and push to staging only when a feature is ready for review.

Local development also protects live sites from accidental data corruption, failed plugin updates, and PHP errors that could take a production site down. The risk/reward calculation strongly favours building locally first.

Prerequisites: What You Need Before Starting

Every method in this guide works on both Windows 10/11 and macOS (including Apple Silicon Macs with M1, M2, and M3 chips). Before picking a method, gather the following:

  • A computer running Windows 10 or later, or macOS 11 Big Sur or later
  • At least 2GB of free disk space (4GB+ recommended for multiple sites)
  • A modern browser (Chrome, Firefox, or Edge)
  • The WordPress zip file from wordpress.org/download (needed for XAMPP and MAMP methods only)

Administrative/sudo rights on the computer are required for the initial software installation. After that, creating additional local sites typically needs no elevated permissions.

Method 1: Install WordPress Locally Using LocalWP (Recommended for Most Users)

LocalWP, developed by WP Engine, is the fastest way to get WordPress running on a local machine. It handles the entire stack — PHP, MySQL, nginx or Apache — invisibly, and creates a working WordPress site in about a minute. No manual database configuration, no terminal commands required.

Step 1: Download and Install LocalWP

Go to localwp.com and download the free installer for Windows or Mac. The application is completely free with no paid tier for the core functionality. Run the installer and follow the standard installation prompts. On Mac, drag the app to the Applications folder. On Windows, the installer handles everything automatically.

Step 2: Create a New Local Site

Open LocalWP and click the large “+” button or “Create a new site.” Enter a site name — this becomes the local domain (for example, “mysite” becomes mysite.local). Click Continue.

Step 3: Choose Your Environment

LocalWP offers a “Preferred” environment (optimised defaults) or a “Custom” option where you can manually select the PHP version, web server (nginx or Apache), and MySQL version. For most use cases, Preferred works fine. If a specific PHP version is needed to match the production server, choose Custom and select the matching version.

Step 4: Set Up WordPress Credentials

Enter a WordPress admin username, password, and email. These are for the local site only — they have no connection to any live site. Click “Add Site” and LocalWP will automatically download WordPress, configure the database, and complete the installation.

Step 5: Access the Local Site

Once LocalWP finishes setup, click “Open Site” to view the frontend, or “WP Admin” to go directly to the WordPress dashboard. The local URL uses a .local domain (e.g., mysite.local) that only resolves on the machine running LocalWP. LocalWP automatically handles the hosts file entry needed for this to work.

Method 2: Install WordPress Locally Using XAMPP on Windows

XAMPP is a free, open-source software bundle that installs Apache, MariaDB, PHP, and Perl on a single Windows or Mac machine. It requires more manual steps than LocalWP but teaches the actual mechanics of a LAMP/WAMP stack — valuable for developers who want to understand what’s happening under the hood.

Step 1: Download and Install XAMPP

Download XAMPP from apachefriends.org. Choose the version matching the PHP version required. During installation on Windows, if a User Account Control prompt appears asking about antivirus, allow the installation. XAMPP installs by default to C:\xampp on Windows.

Step 2: Start Apache and MySQL

Open the XAMPP Control Panel (search for it in the Windows Start menu or find it in the XAMPP installation folder). Click “Start” next to Apache and MySQL. Both should turn green. If Apache fails to start, port 80 is likely occupied by another application — IIS, Skype, or another web server. Change Apache’s port to 8080 in the httpd.conf file or disable the conflicting application.

Step 3: Create a Database in phpMyAdmin

Open a browser and go to http://localhost/phpmyadmin. Click the “Databases” tab at the top. Enter a name for the WordPress database (e.g., “wordpress_local” — use only lowercase letters and underscores). Leave the collation as utf8mb4_general_ci and click “Create.”

Step 4: Add WordPress Files to htdocs

Download WordPress from wordpress.org and extract the zip file. Inside the XAMPP installation directory, locate the “htdocs” folder (C:\xampp\htdocs on Windows). Create a new subfolder with the project name (e.g., C:\xampp\htdocs\mysite) and copy all the extracted WordPress files into it.

Step 5: Run the WordPress Installer

Open a browser and go to http://localhost/mysite. The WordPress installation wizard will load. Select the language, then click “Let’s go.” Enter the database details: Database Name (the one created in phpMyAdmin), Username: root, Password: leave blank (default for XAMPP), Database Host: localhost, Table Prefix: wp_ (change this for security on production — no need on local). Click “Submit” then “Run the installation.” Enter a site title, admin username, and strong password. Click “Install WordPress.” Done — the dashboard is now accessible at http://localhost/mysite/wp-admin.

Method 3: Install WordPress Locally Using MAMP on Mac

MAMP (Mac, Apache, MySQL, PHP) is a popular choice for Mac users who prefer a GUI-based tool over command-line configuration. The free version works well for basic local development. MAMP Pro adds advanced features like virtual hosts and dynamic DNS for around $59/year.

Step 1: Download and Install MAMP

Download the free MAMP installer from mamp.info. The package includes both MAMP (free) and MAMP PRO — only MAMP is needed for local WordPress development. Drag the application to the Mac Applications folder and open it.

Step 2: Start MAMP Servers

Click “Start Servers” in the MAMP application window. Apache and MySQL indicators should turn green. MAMP opens a start page at http://localhost:8888 by default. Click on phpMyAdmin from the MAMP start page to access the database manager.

Step 3: Create a Database

In phpMyAdmin, click “Databases” and create a new database. Give it a lowercase name with no spaces (e.g., “wp_local”). Leave the default collation and click “Create.”

Step 4: Move WordPress Files to the Web Root

MAMP’s web root folder is /Applications/MAMP/htdocs by default. Download and extract WordPress, then copy the WordPress folder (renamed as desired) into the htdocs directory. For example, /Applications/MAMP/htdocs/mysite.

Step 5: Run the WordPress Installation

Navigate to http://localhost:8888/mysite in the browser. The WordPress setup wizard will load. On the database configuration screen, use the following: Database Name: (the name from Step 3), Username: root, Password: root (MAMP’s default), Database Host: localhost:8889 (note the port — MAMP uses MySQL on port 8889). Complete the setup wizard to finish the installation.

Migrating a Local WordPress Site to a Live Server

A local site is only half the story — eventually it needs to go live. The most reliable migration method uses a plugin like Duplicator or All-in-One WP Migration. Install the plugin on the local site, create a migration package, upload the package to the live server, and run the installer. Both plugins handle database URL replacement automatically, which is the most common source of errors when moving a WordPress site between URLs.

LocalWP users have an additional option: the “Connect” feature pulls sites directly to WP Engine or Flywheel hosting with a single click. For other hosts, LocalWP can export a WXR file (WordPress export format) or a full ZIP package compatible with third-party migration plugins.

Always change the admin password, enable SSL, and run a security plugin scan after migrating. Local environments typically use weak credentials that are fine for offline use but unacceptable on a public server.

Top 10 Local WordPress Development Tools Worth Using

The right local development tool depends on technical comfort level, operating system, and whether the workflow involves a specific hosting provider. Here are the ten strongest options available, ranked from most beginner-friendly to most technical.

1. LocalWP (Local by WP Engine) — Best for Beginners and Freelancers

LocalWP is the most widely used local WordPress development application in the industry. It creates a fully configured WordPress environment in about one minute with zero server knowledge required. The application is free and available for Mac, Windows, and Linux.

  • One-click site creation with automatic PHP, MySQL, and web server setup
  • Live Links feature generates a temporary public URL for client previewing
  • WP-CLI integration for command-line operations without additional setup
  • PHP version switching between 7.4, 8.0, 8.1, 8.2, and 8.3
  • One-click migration to WP Engine or Flywheel hosting

The standout strength is the elimination of every manual server configuration step — no editing php.ini, no port conflicts to resolve, no hosts file entries to add by hand. The only real limitation is that cloud backup and push-to-host features are exclusive to WP Engine and Flywheel customers; migration to other hosts requires a third-party plugin.

2. WordPress Studio — Best for WordPress.com Integration

WordPress Studio is Automattic’s own local development desktop application, released as an open-source project. It runs on Mac, Windows, and Linux including Apple Silicon, and installs a WordPress environment in seconds. Pricing is free.

  • AI-assisted development through the Studio Code agent (currently in beta)
  • Built-in CLI tool for scripting and automation
  • One-click local-to-production content syncing with WordPress.com
  • Native Apple Silicon support with ARM builds
  • No Docker or manual stack configuration required

WordPress Studio excels for teams already on WordPress.com hosting, where the sync feature alone saves hours of migration work. The Studio Code AI agent adds genuine value by generating blocks and themes from plain-English descriptions, though it remains in beta. The tightest hosting-specific features don’t apply to non-WordPress.com hosting setups.

3. DevKinsta — Best for Kinsta Hosting Customers

DevKinsta is Kinsta’s free Docker-based local development application. It creates isolated containerised environments that closely mirror Kinsta’s Google Cloud infrastructure, making local-to-production parity much tighter than traditional stack tools. Free forever with no paid tier.

  • Docker containers isolate each site’s stack completely
  • Supports PHP 7.2 through 8.3 per-site
  • Built-in Adminer database manager and SMTP email testing
  • One-click WordPress Multisite configuration
  • Push/pull directly to Kinsta staging and production environments

The strongest feature is environment parity — because DevKinsta mimics Kinsta’s actual stack, bugs that appear on Kinsta will reproduce locally, which eliminates the “works on my machine” problem. The downside is that Docker increases memory and CPU usage, making it heavier than alternatives like LocalWP on lower-end machines.

4. XAMPP — Best for Learning Server Architecture

XAMPP remains the most widely documented traditional local server stack for beginners who want to understand how Apache, PHP, and MySQL work together. It runs on Windows, Mac, and Linux and is entirely free.

  • Includes Apache, MariaDB, PHP, and Perl in one installer
  • phpMyAdmin for database management via browser
  • Available for PHP 8.0 through 8.2
  • Supports multiple virtual hosts for running multiple local sites
  • Non-WordPress PHP projects work without any additional configuration

XAMPP’s real value is educational — manually setting up a database, editing wp-config.php, and troubleshooting port conflicts teaches fundamentals that GUI tools hide. The main limitation is that it maxes out at PHP 8.2 through the official packages, while production servers increasingly require 8.3 or 8.4. Manual WordPress installation also adds steps that purpose-built tools skip entirely.

5. MAMP / MAMP Pro — Best Traditional Option for Mac Users

MAMP has served Mac WordPress developers for over two decades. The free version provides a stable Apache/MySQL/PHP stack with a clean GUI. MAMP Pro adds virtual hosts, dynamic DNS, and a PHP version manager at approximately $59/year.

  • One-click server start for Apache and MySQL
  • phpMyAdmin included for database management
  • PHP version selection (free version limited to default PHP)
  • Supports multiple simultaneous PHP versions with MAMP Pro
  • Available for both Mac and Windows

MAMP Pro’s virtual host support makes it practical for running multiple named local sites simultaneously (site1.local, site2.local) without switching folders or ports. The free version is functional but dated compared to LocalWP — the interface feels rooted in the early 2010s. Most new Mac users are better served by LocalWP unless MAMP Pro’s specific features are needed.

6. Laragon — Best Lightweight Option for Windows

Laragon is a fast, lightweight Windows development environment that installs Apache or nginx, MySQL or MariaDB, and PHP in a minimal footprint. It automatically creates virtual hosts for every project, so new sites appear as sitename.test in the browser with no manual hosts file editing. Free and open-source.

  • Automatic virtual host creation for every project folder
  • Easy PHP version switching via the Laragon menu
  • Supports MySQL, MariaDB, PostgreSQL, and MongoDB
  • Integrated npm, Composer, and Node.js for modern toolchains
  • Portable version available for running from a USB drive

Laragon is significantly faster to install and lighter on system resources than XAMPP or WampServer. The automatic .test domain setup is a genuine convenience that most traditional stacks require manual configuration to replicate. The limitation is Windows-only support — Mac and Linux developers need to look elsewhere.

7. WampServer — Best for PHP 8.4 on Windows

WampServer is a Windows-specific WAMP stack (Windows, Apache, MySQL, PHP) that supports PHP versions up to 8.4 through downloadable add-on packages. It ships with Apache 2.4, multiple MySQL/MariaDB options, phpMyAdmin, and Adminer. Completely free.

  • PHP version switching via the system tray icon without restarting
  • Supports PHP up to 8.4.x via community add-ons
  • Includes both phpMyAdmin and Adminer for database management
  • Apache virtual hosts configuration through the tray menu
  • Multiple simultaneous PHP builds installed side by side

WampServer’s strongest point is PHP 8.4 support, which outpaces XAMPP’s official packages. The tray-based version switching makes testing across PHP versions genuinely convenient. The weakness is Windows-only reach and a period of instability around the official website — check community forums for the current stable download link if the official site is unavailable.

8. Lando — Best for Teams and Advanced Configurations

Lando is a Docker-based local development tool designed for development teams who need consistent, reproducible environments across multiple machines. It works on Mac, Windows, and Linux and supports WordPress alongside Drupal, Laravel, and many other platforms. Free and open-source.

  • Configuration stored in a .lando.yml file that can be committed to a Git repo
  • Supports custom Docker containers and services per project
  • Built-in integration with Pantheon, Acquia, and Platform.sh hosting
  • WP-CLI, Composer, and drush available out of the box
  • Consistent environment specification shared across the entire dev team

Lando’s version-controlled configuration file is its defining feature — a new developer clones the repo, runs “lando start,” and has an identical environment to every other team member within minutes. The learning curve is steeper than GUI-based tools, and Docker is a hard dependency. For solo developers or beginners, Lando is overkill. For teams, it eliminates environment inconsistency almost entirely.

9. ServBay — Best All-in-One Desktop App for Advanced Users

ServBay is a newer desktop development environment that bundles PHP (7.1 through 8.4), multiple web servers, databases, Caddy, Redis, Memcached, Mailpit, and more into a single GUI application for Mac and Windows. The base version is free with optional paid add-ons for cloud features.

  • Supports PHP 7.1 through 8.4, including the latest PHP 8.4 release
  • Built-in SSL certificate management for .local and .test domains
  • Redis and Memcached included for caching testing
  • Mailpit integration for local email testing without external SMTP
  • One-click switching between nginx, Apache, Caddy, and LiteSpeed

ServBay covers ground that most competing tools leave to additional configuration — built-in Redis, Memcached, and LiteSpeed support make it genuinely useful for testing performance-sensitive WordPress configurations. The application is still maturing and the community is smaller than XAMPP or MAMP, which means fewer tutorials and less Stack Overflow coverage when something breaks.

10. InstaWP — Best for Quick Sandboxes Without Local Setup

InstaWP is a cloud-based WordPress sandbox that spins up a temporary WordPress environment in seconds — no local installation required. Plans start at $2/month for basic sandboxes, with production-capable plans from $5/month. Not technically a local development tool, but serves the same “test first, go live second” workflow for users who cannot or prefer not to install software locally.

  • Live WordPress environment in the browser within 10 seconds
  • Shareable sandbox URLs for client demos and plugin testing
  • Template system for pre-configured WordPress setups
  • API access for programmatic sandbox creation
  • Automatic environment cleanup after a defined period

InstaWP eliminates setup entirely — a meaningful advantage when testing an unfamiliar plugin quickly or giving a client a live preview without spinning up a staging server. The tradeoff is that sandboxes require internet connectivity, data lives on a third-party server, and the cost adds up over time compared to free local tools. Best used as a complement to a real local environment rather than a full replacement.

Pricing Comparison for Local WordPress Development Tools

LocalWP, WordPress Studio, DevKinsta, XAMPP, WampServer, and Lando are all completely free with no paid tier for core functionality. Laragon is also free. MAMP Pro runs approximately $59/year for the Pro version, while the basic MAMP is free. ServBay offers a free tier with optional paid cloud add-ons. InstaWP is the only tool in this list with a mandatory paid plan — starting at $2/month — because it hosts environments on remote servers rather than local hardware.

For developers who want to avoid recurring costs, LocalWP or WordPress Studio cover 90% of use cases at zero cost. MAMP Pro is the only local-stack tool with a meaningful price, and it’s justifiable only if the virtual host management and dynamic DNS features solve a real workflow problem.

How to Choose the Right Local WordPress Tool

The first decision point is operating system. LocalWP, WordPress Studio, DevKinsta, Lando, and ServBay run on both Mac and Windows. XAMPP and MAMP also support both platforms. Laragon and WampServer are Windows-only, making them irrelevant for Mac users regardless of their other strengths.

Technical comfort level matters more than any feature list. A developer who has never configured a web server will get a working WordPress site in about 60 seconds with LocalWP and might spend 30 minutes troubleshooting XAMPP port conflicts. Once the fundamentals are solid, a move to XAMPP or Lando is straightforward — the reverse is rarely necessary.

Hosting-specific integrations are the strongest tie-breaker for developers already committed to a particular host. Kinsta customers benefit meaningfully from DevKinsta’s environment parity. WP Engine or Flywheel customers get real push-to-host functionality from LocalWP that other tools can’t match. WordPress.com users gain the most from WordPress Studio.

Team size is the next filter. Solo developers rarely need the environment reproducibility that Lando provides through its .lando.yml configuration. For teams of three or more working across different machines, Lando’s consistency advantage is worth the steeper learning curve. DevKinsta and LocalWP both handle multi-developer setups reasonably, but without the Git-committed environment definition that Lando brings.

PHP version requirements are an underappreciated consideration. If a project requires PHP 8.4 — increasingly common as WordPress minimum requirements rise — WampServer (Windows) or ServBay (Mac/Windows) are the only tools with native PHP 8.4 support as of 2026. LocalWP and DevKinsta top out at 8.3 in their standard builds.

FAQ

Does installing WordPress locally affect my live website?

No. A local WordPress installation runs entirely on the computer and has no connection to any live website. Changes made locally — theme edits, plugin activations, database modifications — have zero impact on a production site until files are manually migrated.

Can I run multiple WordPress sites locally at the same time?

Yes. LocalWP, DevKinsta, Laragon, and most modern local development tools support running multiple sites simultaneously. Each site gets its own database and local domain. XAMPP supports multiple sites through virtual host configuration, though the setup is manual compared to GUI tools.

How do I access my local WordPress site from another device on the same network?

LocalWP’s Live Links feature generates a temporary public URL accessible from any device without additional configuration. For XAMPP and MAMP, the local IP address of the development machine (e.g., 192.168.1.x) can be used to access the site from other devices on the same local network, provided the firewall allows the connection.

What happens to my local WordPress site when I shut down the computer?

The files and database persist on the hard drive. The web server stops running, so the site becomes inaccessible until the local server application (LocalWP, XAMPP, MAMP, etc.) is reopened and the servers are restarted. No data is lost during shutdown.

Is local WordPress development safe for production-quality plugins?

Yes, with one caveat. Local environments are ideal for development and initial testing, but pre-launch testing on a staging server that mirrors the production stack is still recommended. The PHP version, server software, and caching configuration on a shared hosting account may differ from the local setup in ways that reveal bugs not caught locally.

Which local development tool works best for Apple Silicon (M1, M2, M3) Macs?

LocalWP and WordPress Studio both have native ARM builds optimised for Apple Silicon. DevKinsta runs through Docker’s Rosetta 2 compatibility layer, which works reliably but adds minor overhead. MAMP’s newer versions support Apple Silicon natively. Avoid older XAMPP builds on Apple Silicon — use the ARM64 builds from the Apache Friends website.

Can I use WP-CLI with local WordPress installations?

Yes. LocalWP has WP-CLI built in, accessible through the “Open Site Shell” button. For XAMPP and MAMP, WP-CLI must be installed separately and configured to use the local PHP binary. Lando and DevKinsta both include WP-CLI in their default WordPress stack configuration.

Pro Tips for Local WordPress Development

Set the WordPress debug constants in wp-config.php on every local site. Add define( 'WP_DEBUG', true ); and define( 'WP_DEBUG_LOG', true ); to expose PHP errors and warnings that a production server would suppress. This catches coding errors, deprecated function calls, and hook conflicts long before they reach a live environment where users would see them.

Use a dedicated local email testing tool instead of a real SMTP server. Tools like Mailpit (built into ServBay), MailHog, or the WP Mail SMTP plugin’s preview mode capture outgoing emails from WordPress and display them in a local interface, without actually sending anything to real email addresses. This prevents accidentally emailing real users during development and makes it easier to review transactional email layouts.

Keep local database dumps as snapshots before testing risky changes. In LocalWP, right-click a site and choose “Export.” In phpMyAdmin (XAMPP/MAMP), use the Export tab to save a .sql file. A two-minute database snapshot before attempting a major plugin update or data migration eliminates the risk of spending hours restoring a broken local site.

Match the local PHP version to the production server exactly. Mismatched PHP versions are one of the top causes of “works locally, breaks live” scenarios. Check the production PHP version in the hosting control panel, then set the local environment to the same version. LocalWP and DevKinsta make this a dropdown selection. XAMPP users may need to download a specific PHP version package from the Apache Friends archive.

Learn to use WP-CLI for bulk operations — it’s dramatically faster than the WordPress dashboard for tasks like running database searches and replaces during URL migrations, bulk-updating plugins, importing content from WXR files, and regenerating thumbnails. The combination of a local environment and WP-CLI turns hour-long maintenance tasks into commands that run in seconds.

Conclusion

The gap between a beginner WordPress site and a professional development workflow comes down to one practice: building and testing locally before touching anything live. LocalWP is the right starting point for the vast majority of developers — it’s free, handles every setup step automatically, and works identically on Mac and Windows. Developers who want to understand the underlying stack should spend time with XAMPP or WampServer. Teams building at scale get the most from Lando or DevKinsta’s Docker-based approach.

The XAMPP method and the MAMP method remain relevant for developers who need to understand PHP configuration, virtual host setup, or database mechanics at a deeper level than GUI tools expose. That knowledge pays dividends when diagnosing production server issues that can’t be reproduced in a simplified local environment.

Pick one method, get a local WordPress site running today, and start the next project there instead of directly on a live server. The time saved on a single mistake alone will justify the ten minutes of initial setup many times over.

Al Mahbub Khan
Written by Al Mahbub Khan Full-Stack Developer & Adobe Certified Magento Developer