Install WordPress locally.
Themeisle content is free. When you purchase through referral links on our site, we earn a commission. Learn More

Installing XAMPP and WordPress to set up a local development site is a smart move when you need a private space for testing or experimenting. XAMPP allows you to host a website right from your own Windows PC. Once installed, launching a new WordPress site takes just a few clicks.

However, the process can be a bit challenging, and it’s helpful to have some guidance.

In this detailed guide, I’ll walk you through the steps to install XAMPP and then use it to create a local WordPress development site on a Windows PC. I’ll also discuss some typical XAMPP errors and offer troubleshooting tips to solve any issues you might face (although most users won’t have any trouble if they follow this guide closely).

By the end of this tutorial, you’ll have a functional local WordPress testing environment set up!

Pro tip:

If what you’re really looking for is how to roll out WordPress for a live site, then you might want to consider going straight to a host like Bluehost and let them handle the technical setup. Bluehost is a web hosting firm. The way this works with them is that you select a hosting plan that fits your needs (most of the time it’s going to be the cheap plan at $2.75 / month), and then select the option to have WordPress installed on your setup automatically.

Step 1: Download and install XAMPP on your computer 🖱️

Note: If you need a more general guide on installing WordPress in other environments – not just locally, but on live servers as well, then please hop over to how to install WordPress: a complete beginner’s guide.

The first step on your way to install WordPress locally is to download and install the XAMPP software. You can download the Windows installer file from Apache Friends. It’s a big file, about 110 MB, so it might take a minute or so depending on your connection:

xampp website - your tool to install WordPress locally.

Once the download finishes, run the file you downloaded to launch the XAMPP installer. If you’re running antivirus software, you might get a warning like this:

xampp install.

Just click Yes to continue. Depending on your Windows configuration, you might also get a prompt about User Account Control (UAC). Just continue through that prompt as well. Once you get through all of the prompts, you should see the standard installer screen:

launch setup.

Just click Next to continue.

On the next screen, you can choose which components to install. To install XAMPP and WordPress, you do not need all of the components. In addition to the required components, all you need are:

However, some of the other components can be useful. For example, if you want to send/debug transactional emails, you might want to install the email-related components. It’s totally up to you, though.

required components.

Again, this is all that’s needed to install WordPress locally. Uncheck everything else and click Next.

You can now select which folder to install XAMPP in. I always leave it as the default:

target folder to install WordPress locally.

On the next screen, you can choose your preferred language.

Once you click Next, you’re ready to run the install:

finalize the install

The install process might take a few minutes:

XAMPP install process.

Once it finishes, you can launch the control panel to start working with XAMPP:

go to control panel.

Step 2: Start the modules and test your server 🏁

To install XAMPP and WordPress properly, you’ll need to run two modules:

  • Apache
  • MySQL

You can start both modules from the XAMPP control panel:

launch the server.

Once you launch them, you should see their status turn to green:

database install.

And now you should be able to test that your local server is working by going to http://localhost/ in your web browser of choice:

everything on localhost.

If all went well, you now have a functioning XAMPP server on your Windows PC! But now it’s time to install XAMPP and WordPress. So here’s how to get a WordPress site up and running on XAMPP.

Step 3: Add the WordPress files 📂

If you’ve ever manually installed WordPress, the rest of the process should feel pretty familiar. First, you need to go to and download the latest version of WordPress.

Then, in Windows, navigate to the folder where you installed XAMPP. For me, that’s C://xampp. It should be something similar for you. Then, in that folder, find the htdocs subfolder:

add the files to the folder.

In htdocs, create a new folder for your test site. This folder name will become the sub-name used to access your site. For example, if you make the folder testsite, you’ll access your site by going to http://localhost/testsite.

Once you create the folder, extract the WordPress .zip file you downloaded from into it:

target directory.

Step 4: Create a database for WordPress ⚙️

Next, you need to create a MySQL database for your WordPress install. To do that, launch PHPMyAdmin from your XAMPP control panel:

create the database.

Then click on Databases at the top:

go to databases.

And enter a name for your database and click Create. Your name can be anything – just remember it because you’ll need it for the next step:

create a database.

Unlike installing WordPress on a live web server, when you install XAMPP and WordPress, you don’t need to worry about creating a database user.

Step 5: Install WordPress locally via the on-screen installer 🚧

When you visit your test site, you should see the normal WordPress installer. Remember, your test site is just http://localhost/FOLDERNAME:

install WordPress on XAMPP.

The only step where this process will differ from a normal install is the database details. When you get to the database details, enter them like this:

  • Database Name = Name of the database you created in PHPMyAdmin
  • Username = “root”
  • Password = leave blank
database settings when you install WordPress locally.

Then finish the rest of the WordPress install process like normal.

Once you complete the process, you should see your brand new WordPress install running perfectly on your local host:

new WordPress site installed on XAMPP.

Troubleshooting common XAMPP errors

If you followed our XAMPP tutorial above, you should hopefully be up and running without any issues. However, in rare cases, you might run into some XAMPP errors which require troubleshooting.

Here are some tips for fixing common XAMPP errors… ⚠️

XAMPP Maximum PHP Execution Time Exceeded error

The Maximum PHP Execution Time Exceeded error is a very common issue on WordPress installs that you’ve created with XAMPP.

Thankfully, you can usually fix it just by editing a single line in one of the XAMPP configuration files.

To begin, open the XAMPP Control Panel and click the Config button next to Apache. In the dropdown list, choose the option for PHP (php.ini):

Open php.ini file in XAMPP.

This should open the php.ini file in your default text editor.

In the file, search for the following line:


You should see something like max_execution_time=120.

To fix the XAMPP Maximum PHP Execution Time Exceeded error, all you need to do is increase the value of the number. For example, you could try doubling it to 240.

XAMPP Maximum File Size Exceeded error

The Maximum File Size Exceeded error is another common problem that you might see when you try to upload files to the local WordPress site that you created with XAMPP.

Thankfully, it’s easy to fix. In fact, you can fix it from the exact same spot where you fixed the previous error – the php.ini file.

To begin, open the php.ini file (you can follow the steps in the previous section).

Then, search for the following line:


You might see something like upload_max_filesize=40M.

To increase the upload limit and fix the error, all you need to do is increase the number. For example, you could make it upload_max_filesize=40M.

While you’re editing the php.ini file, you’ll also want to make the same change to the post_max_size number.

XAMPP Apache Shutdown Unexpectedly error

This error means that something went wrong with Apache that caused it to crash. Apache is the webserver that XAMPP relies on, so a crash in Apache means your local development sites will stop working.

Because this is such a critical error, we have an entire guide on how to fix the XAMPP Apache Shutdown Unexpectedly error.

Error 403 – XAMPP access forbidden error

Another common error message is the XAMPP access forbidden error, which typically manifests as a 403 error when you try to access your database with phpMyAdmin (or sometimes other pages).

Typically, this happens because of a misconfiguration in one of the XAMPP configuration files.

To fix this, click on the Config button next to Apache in the XAMPP Control Panel.

From the dropdown, select the httpd-xampp.conf file, which should automatically open it in your default text editor.

Open httpd.conf file in XAMPP.

Look for a line of code that starts with Alias /phpmyadmin.

Within that code block, you should see a line that says Require local. Change that line to say Require all granted instead.

That should fix the XAMPP database access forbidden error and give you access to phpMyAdmin.

What about multisite or staging?

How to install XAMPP and WordPress multisite

If you want to play around with WordPress multisite, it’s also possible to configure WordPress multisite to work on your local host. Rather than duplicating information, though, I’ll just direct you to Vishnu’s post on how to set up WordPress multisite on a local host.

Should you use XAMPP and WordPress for staging?

While running WordPress on your localhost is a great way to experiment and try things with WordPress, you shouldn’t use it as an actual staging site for a live site.

That’s because it has a different hardware configuration than your live site. So just because something works or doesn’t work on your XAMPP WordPress install doesn’t mean it will be the same on your live production site.

Instead, using a subdomain or your host’s staging service are much better ways to create a WordPress staging site. You can also use a dedicated WordPress staging plugin.

Wrapping things up on how to install WordPress locally on XAMPP

Once you learn how to install XAMPP and WordPress the first time, you can quickly spin up new testing sites whenever needed.

As a freelance writer, I use XAMPP installs to review any number of themes and plugins. At this point, I probably have about 60 separate WordPress installs running on XAMPP. So if you need any assistance with XAMPP and WordPress, leave a comment and I’ll try to help out!

👉 If you’re interested in some other ways to create local WordPress development sites, we also have a lot of other useful guides:

Do you still have any questions about how to install WordPress locally with XAMPP? Let us know in the comments!

Yay! πŸŽ‰ You made it to the end of the article!

Oldest Most Voted
Inline Feedbacks
View all comments
Odunayo bamidele
June 4, 2024 3:54 pm

Hi Colin, pls I need the most suitable WordPress theme for e-library.

August 10, 2018 9:15 am

Great article. Really helpful. xampp is much easier to work with than wamp so far.

August 1, 2018 6:53 pm

how do it get this to be internal at a small company, so that everyone can access?

Ams Scholar Cisse
June 28, 2018 7:33 pm

Thank you, great explanation

Gershom Amanya
March 27, 2018 11:35 am

The program can’t start because api-ms-win-crt runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem..

what can i do over this problem

Anne Fenwick
November 25, 2017 6:15 pm

Thank you! That was so clear and easy to follow.

Appbazooka App
October 5, 2017 9:08 am

This is great, very well explained
How to setup local Host website on Windows & Mac

Steven Muchnick
September 4, 2017 1:00 am

By the way, I perhaps should have mentioned that I’ve created the three pages I need using just HTML and CSS. All I need WordPress for — if I need it at all? — is to install MosterInsights’ Google Analytics.

Steven Muchnick
September 4, 2017 12:57 am

I’m trying to get WordPress running with a local server on Windows 7 using XAMPP. I get Apache to turn green in the XAMPP v3.2.2 Control Panel, but installing MySQL gets “Attempting to start MySQL service…” three times and nothing more. MySQL does NOT turn green. Any ideas? I would strongly prefer replies or notification of replies to, which is my primary email address.

Rodwell Smith
August 30, 2017 12:12 am

Could I have some help getting past the position shown in photo added?
I am trying to install WordPress following the instructions above. I have name my “testsite” to be 2017… I am seeing the pictured page at the start of step 5….comment image

Akshay Tiwari
August 11, 2017 10:21 am

thank you so much it work you told

Falak Khalil
July 30, 2017 12:04 pm

thank you for help, but i am having some issue πŸ™ it is saying:
“We were able to connect to the database server (which means your username and password is okay) but not able to select the (nameofmydatabase) database.”
please help πŸ™

Mart Carrion
July 16, 2018 11:51 pm
Reply to  Falak Khalil

did it show up before installing wordpress? if so just reinstall xampp. it took me whole day o find this solution πŸ™‚

July 25, 2017 8:13 am

Thank You for sharing such a great information with us. If you really want to run your wordpress website in smooth environment then setup wordpress on localhost using XAMPP as it is the best solution you have. It gives you an option to play with themes and plugins as well. While researching to work on localhost using xampp i have found two great resources through which anyone can easily learn to work on localhost.

Himanshu Lohani
July 22, 2017 1:51 pm

very well written. Thanks for the information.

Spin Cipher
June 19, 2017 9:02 pm

Best WordPress/Xampp install instructions I have found on the web.

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!