
Want to build or test a WordPress site without touching your live server? You can run a fully working WordPress install right on your own computer using a free tool called XAMPP. It turns your laptop into a local server so WordPress behaves exactly as it would online, but only you can see it.
This guide walks through every step needed to install WordPress locally using XAMPP, including how to fix the most common errors you might hit along the way.
Key takeaways
- XAMPP is free software that makes your computer act like a web server, letting you run WordPress locally.
- The process involves five main stages: install XAMPP, start its server modules, add the WordPress files, create a database, and run the WordPress installer.
- Default XAMPP database credentials for a local setup are username
rootwith a blank password, but use whatever your own setup is actually configured with. - If you hit a "Maximum PHP Execution Time Exceeded" error, editing one line in
php.iniusually fixes it. - For a simpler WordPress-specific local environment, tools like Local (by Flywheel) are worth considering instead.
Is XAMPP still the right choice?
XAMPP is a perfectly workable option if you want a more hands-on, manual local server setup. That said, there are now more modern tools built specifically for WordPress local development. One of the most popular is simply called Local, which many WordPress users prefer for its simpler, WordPress-focused workflow.
If you just need a local environment to test themes, plugins or site changes before pushing them live, either tool will do the job. The steps below focus on XAMPP.
And if what you actually need is a live WordPress site rather than a local test environment, that's a different conversation, our WordPress development service is a good place to start.
Step 1: Download and install XAMPP
Head to the official XAMPP website and download the version that matches your operating system. Versions are available for Windows, macOS and Linux, and the installation process is similar across all of them.
It's a fairly large download, so give it a moment. Once it's finished, run the installer file. If your antivirus throws a warning, you can dismiss it safely, provided you downloaded XAMPP from the official source.
Click through the installer prompts. On the component selection screen, you don't need everything. You can deselect the developer tools and just keep the core components. Click Next a couple more times to kick off the installation.
The installation can take a few minutes and may look like it's frozen. It isn't, just leave it to finish.
Step 2: Start the server modules and test that everything works
Once XAMPP is installed and you've opened the app, don't assume it's ready to go. You still need to start the server services manually.
Go to the Manage Servers tab. Select each service in the list and click Start. When they're running, their status indicators will turn green.
To confirm your local server is working, open a browser and go to http://localhost/. If you see the XAMPP welcome page, you're good to go.
Step 3: Add the WordPress files
Download the latest version of WordPress from wordpress.org. Once you have it, you need to put the files in the right place.
In the XAMPP app, click Open Application Folder. Inside that folder, open the subfolder called htdocs. This is where XAMPP looks for websites to serve.
Create a new subfolder inside htdocs, this will be the home of your local WordPress site. Give it a short, descriptive name. For example, myblog.
Now unzip the WordPress archive you downloaded and move all of its contents into that new folder. Once that's done, your local site will live at http://localhost/myblog (or whatever you named your folder).
Step 4: Create a database in phpMyAdmin
WordPress needs a database to store its content. To create one, go to http://localhost/dashboard/ and click phpMyAdmin in the top menu.
In phpMyAdmin, click the Databases tab at the top. Enter a name for your new database and click Create. The name can be anything you like, just make a note of it because you'll need it in the next step.
On most default XAMPP installations, you won't need to create a separate database user for a local WordPress site. You can use the default MySQL credentials that come with XAMPP (more on those below).
Step 5: Run the WordPress installer
Open a browser and go to your local site URL, for example, http://localhost/myblog. You'll see the standard WordPress installation screen. Click Let's go!
The only part that differs from a normal WordPress install is the database details screen. On a default XAMPP setup, you can enter the following:
| Field | Value |
|---|---|
| Database Name | The name you created in phpMyAdmin |
| Username | root |
| Password | (leave blank) |
| Database Host | localhost |
| Table Prefix | wp_ |
If you've secured MySQL or phpMyAdmin differently on your machine, use those credentials instead of the defaults above.
If the installer can't write the config file automatically, it will show you the contents and ask you to do it manually. Copy the text it gives you, paste it into a new file, save that file as wp-config.php, and place it in the root of your WordPress folder. Then click Run the installation.
From there, fill in your site title, pick an admin username and password, and click Install WordPress. When it's done, you'll get a confirmation screen with a login link. Click it, enter the credentials you just set, and you'll land on the WordPress dashboard. That's it, WordPress is now running locally on your computer.
Troubleshooting common XAMPP errors
Maximum PHP Execution Time Exceeded
This is a known issue with WordPress installs on XAMPP. The good news is that it's usually fixed by changing a single line in one configuration file.
Open the XAMPP app and click Open Application Folder. Navigate into the etc subfolder and open the file called php.ini in a text editor. Find the max_execution_time setting and increase its value, then save the file and restart the Apache module in XAMPP.
If you're unsure about editing config files yourself, this is exactly the kind of task our website maintenance service can help with on your live site, keeping your PHP configuration properly tuned so things don't fall over.
Ready to go further?
A local WordPress environment is brilliant for testing changes safely before anything goes near a live site. But when you're ready to move your work online, or you need ongoing help keeping a live WordPress site secure, updated and running well, get in touch with the IceBox team and we'll take it from there.
Frequently asked questions
Is XAMPP free to use for local WordPress development?
Yes, XAMPP is free software. You can download it from the official XAMPP website and use it to run WordPress on your local machine at no cost.
What are the default database credentials for WordPress on XAMPP?
On a default XAMPP installation, the MySQL username is 'root' and the password is left blank. If you've configured your XAMPP MySQL setup differently, use those credentials instead.
Can anyone else see my local WordPress site when I run it on XAMPP?
No. A local WordPress install on XAMPP only exists on your computer. It's not accessible over the internet, so it's completely private, ideal for testing and development.
What is the difference between XAMPP and Local for WordPress development?
Both tools let you run WordPress on your own computer without a web host. XAMPP is a general-purpose local server that requires more manual setup. Local is a modern tool built specifically for WordPress and offers a simpler, more streamlined workflow for WordPress developers.
Related services
Need a hand with this? Here's how IceBoxDesigns can help.