Skip to Main Content

How to install WordPress locally on a PC / Windows with XAMPP

Divi: the easiest WordPress theme to use

Divi: The best WordPress theme of all time!

With over 600.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]

Installing WordPress locally (on your computer) will save you a lot of time if you regularly test or develop WordPress themes or plugins.

Not only will your locally created websites work much faster than they would on the internet, but you will also have a much safer test environment far from a website.

Having a localhost environment has dramatically improved my workflow and is even an important part of my professional WordPress life. It's a waste of money when it comes to using a WordPress installation on the internet with a web host as a test environment!

Today, we are going to look at XAMPP as a free server environment for Windows applications. It is easy to install and is open source.

We also invite you to discover our article on How to install WordPress on a USB flash drive


What is XAMPP?

XAMPP is a multiplatform Windows application (Apache, MySQL, PHP and Perl). It's a simple and lightweight solution that allows you to create a local web server for testing purposes.

Since XAMPP has become a multiplatform, it also works on Mac and Linux, but today we will try to set up XAMPP on Windows.

WordPress is not a stand-alone application, so it needs a server software to work. XAMPP provides the environment necessary to run WordPress on a local machine.

We also invite you to discover How to install WordPress on Google Cloud

Installing XAMPP

Go to the Apache Friends web site et download XAMPP .

how to install local wordpress pc windows xampp 14

The XAMPP file weighs about 145 MB. Once downloaded, launch the installer. You may receive warnings about installing the software on your computer. As you would when installing software on Windows, use your good judgment.

The XAMPP configuration wizard will guide you through the installation.


In the next window, you will be prompted to select which components of the software you want to install and which ones you do not want. Some options, such as: Apache and PHP are grayed out, because they are essential and essential for the smooth operation of XAMPP.

See also our MailChimp tutorial in English: the complete guide to creating a newsletter

So it's up to you to choose the rest of the components you want or do not want. As we need to install WordPress in localhost, we will leave MySQL and phpMyAdmin checked and uncheck the remaining options.

Choose the software components you want to install and uncheck the ones you do not want.

See also other FTP clients for Windows and Mac

Then select the folder where you want to install XAMPP. We will create a new folder in C: Program FilesXAMPP.

Xampp-select-the folder

In the next window you will be asked if you want to install Bitnami for XAMPP, which offers free tools for the installation of WordPress, Drupal and Joomla!

Easily create your website with Elementor

Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]

Discover our 8 Best Competitive Research Tools for Marketing Pros

We are going to install WordPress manually and without this promotion program, so uncheck the option (Learn More about Bitnami for XAMPP) which means "Learn more about Bitnami for XAMPP" and then click "Next" or "Next" .

In this tutorial, we will configure WordPress manually, so uncheck this option.

After going through all these options, XAMPP is now ready to be installed.

We are almost there ...

Once installed, you will be asked if you want to start the Control Panel. Leave this option checked and click on "Finish".

Installation is fast

If you receive security / firewall warnings during the installation process (such as the one below), check the "Private networks, such as my home or work network" and click on "Allow Access". "This is very important. If you do not allow this access, XAMPP will not work.

Discover How to know which plugins a WordPress website uses

Allow access to Apache and MySQL to ensure that XAMPP will work.

After finishing the installation, you will be asked if you want to launch the Control Panel? if you check yes then the control panel will open automatically. If not, go to the XAMPP folder on your computer and run the XAMPP Control Panel or XAMPP Control Panel.

how to install local wordpress pc windows xampp 11

Start Apache and MySQL. If you installed XAMPP correctly, these two components should work without any errors, however, if there are other applications on your computer that use the same ports as these modules you must close these conflicting applications and restart XAMPP.

We also advise you to consult these 10 WordPress plugins to create a membership website and protect your content

how to install local wordpress pc windows xampp 10

You can check if your new local server is installed by typing the following address. http: // localhost in the address bar of your browser.

how to install local wordpress pc windows xampp 12

Before installing WordPress, we need a database.

How to write an irresistible article introduction ? Discover it in this article

Are you looking for the best WordPress themes and plugins?

Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]

On your XAMPP Control Panel, click on the "Admin" button in the MySQL to install local wordpress pc windows xampp 13

A new window will open automatically with the phpMyAdmin interface.

Discover our tip on How to duplicate a WordPress database with phpMyAdmin

Click on "Admin" for in the MySQL section or go to and type the following address: "localhost / phpmyadmin" in your browser.

how to install local wordpress pc windows xampp 8

If the interface that appears has a different language than yours, you can edit it in the "Appearance Settings" section. But if all goes well, the phpMyAdmin interface should launch with the system default language.

Click on "DatabasesAbove and to the left and you will be asked to create a new database. I called mine WP". When you have entered a name, click on "Create" and close the to install local wordpress pc windows xampp 9

Download the latest version of WordPress.

In order for WordPress to work quite well with XAMPP we need to unzip WordPress in the right folder. Go to the XAMPP folder on your computer and open the htdocs folder, which is C: / Program Files / XAMPP / htdocs.

Go to the XAMPP / htdocs folder on your computer

Unpack WordPress into its own folder and rename it as you want. For the sake of consistency, I will call this installation of WordPress "WP" to match the name of the database I just created.

My installation of WordPress is called "WP".

Open your WordPress folder, find the file wp-config-sample.php and rename it wp-config.php . Open the file and scroll until you see the following lines:

Update your wp-config.php file with the details of your database.

These lines of code define the connection information for your database. Replace "database_name_here" with the name of your database, which in my case is "WP".

Discover How to find the link to the WordPress login page

Replace "username_here" and "password_here" with "root", which is the default username and password.

NB: Some versions of phpMyAdmin come with a root user without password. So if this is the case at home, leave the password blank ""

Save the file and close it.

Now we can proceed to the installation of WordPress.

Open your browser and go to http://localhost/wp/

You should see the home screen of the famous WordPress installation process in five minutes.

how to install local wordpress pc windows xampp 5

Enter your details and click on "Install WordPress. "

Easily create your Online Store

Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]

Log in with your login and voila

how to install wordpress local pc windows xampp 7 e1573198345375

Your WordPress installation is now complete!

Other recommended resources

We also invite you to consult the resources below to go further in the grip and control of your website and blog.


XAMPP provides an easy way to run a local server environment on your Windows machine, allowing you to test and develop locally, rather than installing WordPress on the internet. It will also save you a lot of time since you will not have to install and uninstall WordPress every time you test themes and plugins.

The big news about XAMPP is that it is free and also open source. You can configure as many WordPress installations as you want.

However, you will also be able to consult our resources, if you need more elements to carry out your projects of creation of Internet sites, by consulting our guide on the WordPress blog creation or the one on Divi: the best WordPress theme of all time.

If you liked this tutorial, do not hesitate to share on your different social networks and to comment on it in the reserved section.


This article features 16 comments

  1. Very nice article thank you very much and good luck for the rest I hope to find lots of other tips like this one thanks again

  2. Have you tried out Nomad WP (
    It is an independent WordPress environment (and free) on your computer or a USB key.
    Specially designed around WordPress, it allows to create, copy and delete blogs with a click.
    Nomad WP contains an Apache server, the MySQL database manager, PHP and PhpMyAdmin.

    1. Hello,

      What was she saying? In any case, it certainly was not appropriate or containing advertising links. these are the two reasons why the comments are removed from this site.

  3. Hello,
    First of all thank you for the tutorial.
    I have a little trouble on the opening of the wp-config.php file, windows can not open the file and asks me to select a program from the list.
    Basically with what program open?
    Thank you

Leave a comment

Your email address will not be published. Required fields are marked with *

This site uses Akismet to reduce unwanted. Learn more about how your comments data is used.

Back To Top