
WordPress
How WordPress Version Control Actually Works
Learn how WordPress version control works across Git, databases, deployments, backups, rollbacks and multi-site workflows.
Learn how to install WordPress locally using XAMPP in six easy steps. Develop and test your site safely offline, then seamlessly transition to live environment.
Setting up WordPress locally on your computer can be beneficial for your web development workflow. Whether you're building a site from scratch, testing new plugins or experimenting with themes, a local WordPress installation allows you to work offline and avoid making changes directly on your live site.
However, choosing the right local development setup is crucial. While XAMPP has long been a popular choice for WordPress developers, modern alternatives like DDEV and Lando offer more powerful features and better compatibility with professional hosting platforms like Pantheon.
This guide will walk you through:
Let's start with the traditional XAMPP method, then explore more advanced options.
XAMPP sets up a local server environment on your computer by providing Apache (the web server), MySQL (the database) and PHP (the scripting language) – all of which are essential for WordPress to function. However, since Pantheon doesn’t support Apache, this method isn’t ideal if you plan to deploy to Pantheon in the future. We’ll walk you through an alternative method using Nginx later in this guide.
That said, the XAMPP approach is great for testing and development if you're working outside of Pantheon or want to experiment locally before pushing to a live site.
Head over to the official Apache Friends website and download the version of XAMPP compatible with your operating system (Windows, macOS or Linux). Choose the PHP version recommended for your WordPress version, as this ensures compatibility.

Once the download is complete, launch the installer. Follow the prompts in the setup wizard, making sure to install all components, including Apache, MySQL and PHP.
During installation, select a directory where XAMPP will be installed; the default option should be fine for most users. Once the setup wizard is complete, you’ll have XAMPP installed on your computer. A control panel should open automatically, giving you access to the server components.

With XAMPP installed, the next step is to configure it and start the essential services needed to run WordPress: Apache and MySQL. These components simulate a server environment, enabling you to host and manage your local WordPress site.
Launch the XAMPP control panel from your installation directory. On Windows, you can find it in the start menu or as a desktop shortcut. On macOS or Linux, navigate to the folder where XAMPP is installed and run the control panel application.
In the control panel, you’ll see a list of services. Locate Apache and MySQL, then click the Start buttons next to each. Once started, their status will turn green, indicating they’re running.

Occasionally, you might encounter port conflicts with Apache (often due to another program using port 80 or 443). If this happens, you can reassign the ports by clicking on Config next to Apache and adjusting the httpd.conf file to use an alternative port like 8080.
To verify functionality, open your web browser and type http://localhost into the address bar. If everything is working, you should see the XAMPP dashboard, confirming that Apache is running correctly. And to confirm MySQL is functioning, click Admin next to MySQL in the control panel to open phpMyAdmin, a web-based interface to manage databases.
Before installing WordPress, you’ll need a MySQL database to store your site’s content, user data and settings. Open your browser and navigate to http://localhost/phpmyadmin. This will load the phpMyAdmin dashboard, where you can manage MySQL databases.
In phpMyAdmin, click on the Databases tab at the top. Under Create database, enter a name for your database, such as “wordpress_local”. Use a name that’s easy to remember, as you’ll need it later when configuring WordPress.

For WordPress, it’s recommended to use the utf8mb4_general_ci collation, which supports special characters and ensures compatibility with multilingual content. Select this from the dropdown menu before creating the database. Then, click the Create button to finalize your database setup. You’ll see the new database listed on the left-hand sidebar.
Note: While you won’t create specific user accounts for this setup, XAMPP’s default MySQL credentials are:
Now that your local server environment is up and running and your MySQL database is ready, download WordPress. Go to the official download page and download the latest version of WordPress (a .zip file containing all the necessary files for installation). Once the download is complete, extract the .zip file, and you’ll have a folder named wordpress.
Locate the htdocs folder in your XAMPP installation directory. This is the root directory where your local websites are stored. For easy access, you can rename the wordpress folder to something like my_local_site or any name you prefer. This will also become the URL for accessing your local site (e.g., http://localhost/my_local_site).
Open your browser and go to http://localhost/your-folder-name (replace your-folder-name with the name of your WordPress folder). If everything is in place, you’ll see the WordPress installation screen, ready for the next steps.
Open your browser and navigate to http://localhost/your-folder-name, where the WordPress installation screen should appear. Choose your preferred language and click Continue. Then, fill in the form with your site details:
After that, click Install WordPress to finalize the setup.
Now that the WordPress files are in place, it’s time to check the wp-config.php file to connect and make sure your site is connected to the MySQL database you created earlier. The wp-config.php file acts as the bridge between WordPress and your local server environment.
Open the wp-config.php file in a text editor like Notepad++, Visual Studio Code or Sublime Text. Look for the following lines:
define( 'DB_NAME', 'database_name_here' );
define( 'DB_USER', 'username_here' );
define( 'DB_PASSWORD', 'password_here' );
define( 'DB_HOST', 'localhost' );
Make sure that the placeholders are replaced with your database details:
If not, then change them, save your edits and close the file.
Testing your local WordPress installation ensures that your setup is ready for development. Open your browser and navigate to http://localhost/your-folder-name. This should load the homepage of your WordPress site.
To access the WordPress admin panel, append /wp-admin to your site URL. For example: http://localhost/your-folder-name/wp-admin. Enter the username and password you created during the WordPress installation.
Once logged in, you’ll be directed to the WordPress dashboard, where you can start managing your site. Navigate around your site to ensure all pages load correctly. Go to Appearance > Themes and try activating a theme to verify it applies without errors. Visit Plugins > Add New and install a plugin to confirm functionality.
Create a test post or page from the dashboard and publish it. Then, view it on the front end of your site to ensure WordPress is saving and retrieving data from the MySQL database correctly.
If your site doesn’t load or you encounter errors, double-check your wp-config.php settings to ensure the database details are accurate and that Apache and MySQL are running in the XAMPP control panel.
Congratulations! You’re ready to start creating custom themes, testing plugins or developing content, all without the risk of impacting a live site!
Working with WordPress locally offers a range of advantages that can streamline your development process, enhance your skills and provide a risk-free environment for experimentation. Here are some key benefits:
While XAMPP is a popular choice for setting up a local WordPress environment, it’s not the only option. Depending on your needs, preferences and technical expertise, you might find other tools more suitable for local development. Here are three powerful alternatives:

DDEV is a modern, container-based local development tool built on Docker. It’s designed to simplify the process of setting up and managing environments for WordPress and other platforms because:
If you’re comfortable with Docker or looking for an advanced, flexible tool that mimics production environments, DDEV is an excellent choice.

Docksal is another Docker-based development environment that focuses on consistency and ease of use. It offers pre-configured stacks for WordPress and other CMS platforms. It’s a good choice because:
Docksal is great for teams that need a consistent, shareable environment and developers who want precise control over their stacks.

Lando is a developer-friendly local development tool that abstracts away much of the complexity of Docker. It’s designed for flexibility and supports a wide variety of frameworks, including WordPress. Its main characteristics include:
Lando is perfect for developers who want a quick and flexible way to spin up local environments with minimal hassle. It also integrates smoothly with Pantheon, making deployment easier.
If the Apache or MySQL services fail to start in the XAMPP control panel, the issue is likely in a port conflict.
Solution:
When navigating to http://localhost/phpmyadmin, you might see a “403 Forbidden” or “Access Denied” error.
Solution:
Seeing the “Error establishing a database connection” message when trying to load your WordPress site?
Solution:
If your site’s pages or posts return a 404 error, permalinks might not be working properly.
Solution:
If your local WordPress site is loading slowly, it might be due to your system resources or the way XAMPP is configured.
Solution:
The infamous “white screen of death” can appear with a PHP error or a plugin/theme conflict.
Solution:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Installing WordPress locally is a fantastic way to experiment, test and develop your site without affecting a live environment. When it’s finally time to take your project live or collaborate with a team, you need a platform that combines speed, reliability and modern development tools.
Pantheon offers a cutting-edge hosting solution designed specifically for WordPress and Drupal sites. With built-in developer tools, automated workflows and scalable infrastructure, Pantheon makes deploying and managing your site easy.
In fact, Pantheon’s cloud-based platform elevates the concept of the local environment by mirroring live conditions, eliminating the guesswork when it comes to testing and going live.
Here are some reasons why you should choose Pantheon:
Contact Pantheon today and see how it can transform the way you build and manage WordPress websites!

WordPress
Learn how WordPress version control works across Git, databases, deployments, backups, rollbacks and multi-site workflows.

Website Security
Learn how IT teams can manage WordPress vulnerability exposure after patching, from inventory and verification to investigation, recovery, and readiness.