Setting up a local WordPress environment is a common need for developers, designers, and technical marketers. It allows for experimentation, development, and testing, without risking a live website. XAMPP is often the first tool people try when setting up WordPress locally, but it’s not the most efficient or modern solution.
This guide explains how to install WordPress on XAMPP step by step. Then, it presents a better alternative for local WordPress development and why it might be the smarter choice moving forward.
What is XAMPP and why use it?
XAMPP is a free, open-source local development environment that bundles Apache, MySQL, PHP, and Perl into a single package. It enables you to simulate a web server on your own computer.
Using XAMPP to run WordPress locally is useful if you want to:
- Develop and test WordPress themes or plugins
- Practice working with the WordPress ecosystem without paying for hosting
- Experiment with site migrations or updates before deploying changes live
However, XAMPP comes with trade-offs in terms of speed, simplicity, and compatibility with modern tools.
Requirements before you start
Before you begin the installation process, make sure you have:
- A computer running Windows, macOS, or Linux
- At least 4GB RAM (8GB recommended for better performance)
- A basic understanding of file structures
- Administrative access on your system to install applications
You’ll also need to download the following:
How to install WordPress on XAMPP
1. Install XAMPP
- Download the XAMPP installer for your operating system.
- Run the installer with administrative privileges.
- When prompted, install these components:
- Apache
- MySQL
- PHP
- Choose the default installation directory (usually C:\xampp on Windows or /Applications/XAMPP on macOS).
- Launch the XAMPP Control Panel once installed.
2. Start Apache and MySQL
- In the XAMPP Control Panel, click Start next to Apache and MySQL.
- Wait until both services show as running.
- Confirm by visiting http://localhost in your browser. You should see the XAMPP welcome page.
3. Create a MySQL database for WordPress
- In your browser, go to http://localhost/phpmyadmin.
- Click on Databases in the top menu.
- Under Create database, enter a name like wordpress_local and choose utf8mb4_general_ci as the collation.
- Click Create.
4. Download and extract WordPress
- Unzip the WordPress package you downloaded.
Rename the extracted folder to something readable (e.g., my-wp-site). - Move that folder into your XAMPP htdocs directory:
- Windows: C:\xampp\htdocs\my-wp-site
- macOS: /Applications/XAMPP/htdocs/my-wp-site
5. Configure wp-config.php
- Navigate to your WordPress folder and duplicate wp-config-sample.php.
- Rename the duplicate to wp-config.php.
- Open it in a code editor and update the database credentials:
define( 'DB_NAME', 'wordpress_local' );define( 'DB_USER', 'root' );define( 'DB_PASSWORD', '' ); // Leave blank for XAMPPdefine( 'DB_HOST', 'localhost' );
- Save and close the file.
6. Install WordPress
- In your browser, go to http://localhost/my-wp-site.
- You’ll see the WordPress installation screen.
- Choose your language and click Continue.
- Fill in the site title, admin username, password, and email.
- Click Install WordPress.
You’re done. WordPress is now running locally on your machine.
Known issues and limitations with XAMPP
While XAMPP is a solid option, there are some downsides:
- Limited OS integration: Running on macOS or Linux can be buggy and file permissions often cause issues.
- Manual updates: You’ll need to manage updates to PHP, MySQL, and Apache yourself.
- No built-in HTTPS: Modern development requires HTTPS, but XAMPP doesn’t support it out of the box.
- Slower startup times: Services must be manually started each time.
- Inconsistent environment: Your local stack may differ significantly from production servers.
If you’re just testing something simple, these aren’t showstoppers. But if you’re building serious projects, these can become bottlenecks.
A better alternative: WordPress Studio
WordPress Studio is an official local development tool built by Automattic, the people behind WordPress.com. Designed specifically for WordPress developers, it offers a fast, pre-configured environment that eliminates the complexity of manual setup.
Unlike XAMPP, WordPress Studio is built with WordPress in mind from the start. The experience is optimized for plugin and theme builders who want to focus on coding rather than configuring.
Why WordPress Studio is a smarter option
- Zero setup: Studio is pre-packaged with everything you need to get started, including PHP, MySQL, and WordPress Playground.
- CLI-ready: WP-CLI is built in, so you can run common WordPress commands within Studio instantly.
- Free and official: It’s maintained by the WordPress.com team with first-party support for WordPress-specific development.
- Cross-platform support: Studio is available for macOS, Windows, and Linux.
How to install WordPress with Studio
- Download WordPress Studio from https://developer.wordpress.com/studio/.
- Install and launch the application.
- Click Create New Project.
- Choose a default theme or import one from GitHub.
The app will automatically install and launch WordPress locally. You get a working WordPress site in seconds, without having to manage separate server stacks or databases.
When to use XAMPP vs. WordPress Studio
| Use Case/Feature | XAMPP | WordPress Studio |
| Manual control over server stack | ✅ | ❌ |
| General-purpose PHP projects | ✅ | ❌ |
| WordPress-specific development | ⚠️ | ✅ |
| Speed of setup | ❌ | ✅ |
| No configuration required | ❌ | ✅ |
| WP-CLI built in | ❌ | ✅ |
| HTTPS support | ❌ | ✅ |
| OS compatibility | ✅ | ✅ |
XAMPP may still be relevant for developers working outside of WordPress or those who want fine-grained control over their stack. But for focused WordPress work, Studio is purpose-built and more efficient.
Final thoughts: Use the tool built for the platform
XAMPP works and has been an excellent solution for decades. But when your goal is modern WordPress development, it’s a slower, more cumbersome option than WordPress Studio.
WordPress Studio was created by the people behind WordPress.com. It’s designed specifically for WordPress developers, with tools that reflect current best practices. It offers a focused, high-performance environment with none of the overhead that comes with general-purpose stacks.
Frequently asked questions
What are the minimum system requirements to run WordPress on XAMPP?
To run WordPress on XAMPP, your system should meet these minimum requirements:
- Operating system: Windows 10 or newer, macOS 10.14+ (or a modern Linux distro)
- RAM: 4GB minimum (8GB recommended for smooth performance)
- Disk space: At least 2GB of free space for XAMPP, WordPress, and associated files
- Administrative privileges: Required to install and run services like Apache and MySQL
How do I fix “localhost not working” after installing XAMPP?
If http://localhost doesn’t work after installing XAMPP, try the following troubleshooting steps:
- Check if Apache is running in the XAMPP Control Panel. If it’s not, click Start next to Apache.
- Make sure port 80 is not blocked or in use by another program like Skype, IIS, or VMware. You can change the port in httpd.conf if needed.
- Ensure your browser isn’t forcing HTTPS (e.g., https://localhost) unless you’ve configured SSL.
- Temporarily disable firewalls or antivirus software to rule out connection interference.
Misconfigured ports or missing permissions are the most common causes. Review XAMPP’s error logs for more detail.
Where is the WordPress folder located in XAMPP?
After installing WordPress on XAMPP, your WordPress files should be inside the htdocs directory:
- Windows path: C:\xampp\htdocs\your-site-name
- macOS path: /Applications/XAMPP/htdocs/your-site-name
This folder acts as your local web root. To access the site in a browser, navigate to: http://localhost/your-site-name
How do I access phpMyAdmin in XAMPP?
To open phpMyAdmin in XAMPP:
- Start both Apache and MySQL from the XAMPP Control Panel.
- Open your browser and go to: http://localhost/phpmyadmin
This interface allows you to manage databases for WordPress and other applications. From here, you can:
- Create a new database
Import/export SQL files
Run queries - Manage users and privileges
Make sure MySQL is running. If phpMyAdmin doesn’t load, check for port conflicts or Apache errors.
Can I run multiple WordPress sites on XAMPP?
Yes, you can run multiple WordPress sites on XAMPP by creating a new subfolder for each site inside the htdocs directory:
- Create a new folder inside htdocs (e.g., site2).
- Copy a fresh WordPress installation into the folder.
- Create a new database in phpMyAdmin (e.g., site2_db).
- Edit the wp-config.php file to match the new database details.
- Access the site at http://localhost/site2
Each site is isolated by its folder and database, but all sites share the same Apache and MySQL instance.
Does XAMPP support HTTPS for local WordPress development?
By default, XAMPP does not support HTTPS out of the box. However, you can enable HTTPS by generating a self-signed SSL certificate and modifying Apache’s configuration files (httpd-ssl.conf and httpd.conf). You’ll also need to:
- Enable the mod_ssl module
- Assign SSL to a specific port (usually 443 or 8443)
- Update the VirtualHost directives
Keep in mind that browsers will flag self-signed certificates as insecure. For local testing purposes, this is acceptable, but for accurate staging or client previews, consider tools that support HTTPS natively like WordPress Studio.
What is the easiest way to run WordPress locally without using XAMPP?
The easiest way to run WordPress locally without using XAMPP is by using WordPress Studio. It’s a free tool created by Automattic for local WordPress development. Unlike XAMPP, WordPress Studio doesn’t require manual configuration of Apache, MySQL, or PHP.
It comes pre-configured, includes WP-CLI, and is optimized for WordPress development. You can launch a new WordPress site in minutes with minimal setup, making it a faster and more modern alternative.
Can I use WordPress Studio on Windows and macOS?
Yes, WordPress Studio is compatible with both Windows and macOS, and a Linux version is also available. It’s designed to be cross-platform and installs with minimal configuration on all supported operating systems. This allows developers to use a consistent WordPress development workflow regardless of their OS.
WordPress Studio handles all dependencies internally, so there’s no need to install PHP, MySQL, or nginx separately. This improves compatibility and reduces setup errors that are common with older stacks like XAMPP.
Is WordPress Studio free to use?
Yes, WordPress Studio is completely free. It’s developed and maintained by Automattic, the people behind WordPress.com, and is intended to support the WordPress development community. There are no licensing fees or feature restrictions.
The tool includes everything needed to develop WordPress themes and plugins locally, including a built-in server environment and WP-CLI. There are no upsells, hidden costs, or premium tiers, making it a cost-effective choice for professional developers.
Is XAMPP still a good option for local WordPress development?
XAMPP is still usable for local WordPress development, but it’s not the most efficient or modern choice. It requires manual setup, lacks built-in WordPress tooling, and doesn’t support HTTPS by default.
For developers who want full control over the server stack or are working on general-purpose PHP projects, XAMPP can be helpful. However, for focused WordPress work, tools like WordPress Studio offer a cleaner, faster, and more purpose-built environment with fewer configuration headaches.