How to Install XAMPP and WordPress Locally

WordPress is open source software you can use to create a beautiful website, blog, or app. Beautiful designs, powerful features, and the freedom to build anything you want.

Want to install XAMPP and WordPress locally? This is a great idea if you want a development site that can be used for testing or other purposes. XAMPP lets you run a website from your very own computer. And once you get it set up, you can spin up a new WordPress install with just a few clicks.

But to actually install XAMPP and WordPress can be a little tricky, so you might need a helping hand.

Here’s exactly how to install WordPress locally with XAMPP. At the end of this, you’ll have your very own local WordPress testing environment running on Windows.

Step 1: Download and install XAMPP on your computer

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:

  • MySQL
  • PHPMyAdmin
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’ll get a prompt asking you to install Bitnami for XAMPP. You do not need this to install XAMPP and WordPress, so just uncheck the box:

how to install XAMPP and WordPress on windows

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

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 installation. 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 WP 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 WP 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 WP install process like normal.

Once you complete the process, you should see your brand new WP install running perfectly on your localhost:

Dawood Ahmad

A Multi-Talented & Tech Enthusiast with a passion for software engineering; A Qualified IT & Computers Professional with 2+ years of impeccable experience as Web Developer & Team Lead. Microsoft Certified Trainer & Solutions Developer, Able to work under pressure & deliver projects on time with maximum output, adhering to budgets. Ability to Aim High, Think Smart & Act Fast in Deadline Oriented Situations. Looking forward to developing myself as Team Lead Web Developer to utilize my skills & expertise with maximum potential.

4 thoughts on “How to Install XAMPP and WordPress Locally

  • July 11, 2021 at 1:02 am

    ya buhat helping article tha thank u so much.

  • July 11, 2021 at 1:07 am

    Thanks! it saved my time and worked very well

  • July 11, 2021 at 4:53 pm

    Well Explained. Easy to follow. Looking forward to reading more stuff from you.


Leave a Reply

Your email address will not be published.