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 701.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 run much faster than they would on the internet, but you will also have a much safer testing environment away from a website.

Having a localhost environment has dramatically improved my workflow and is even an important part of my WordPress professional 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 take a look at XAMPP a free server environment for Windows application. 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

xampp

What is XAMPP?

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

Since XAMPP has gone cross-platform, it also works on Mac and Linux, but today we will be looking to set up XAMPP on Windows.

WordPress is not a stand-alone application, so it needs server software to run. XAMPP provides the necessary environment 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 approximately 145 MB. Once downloaded, launch the installer. You may receive warnings about installing software on your computer. As you would when installing software on Windows, use your good judgment.

The XAMPP setup wizard will guide you through the installation.

xampp-install

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

It will therefore be up to you to choose the rest of the components that 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 installing 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 on "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 "Finish".

Installation is fast

If you receive any security / firewall warnings during the installation process (like the one below), check “Private networks, such as my home or work network” and click “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 you finish the installation, you will be asked if you want to launch the Control Panel? if you tick 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 English (XAMPP Control Panel).

how to install local wordpress pc windows xampp 11

Start Apache and MySQL. If you have 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 should close those 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

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

A new window will automatically open with the phpMyAdmin interface.

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]

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

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

how to install local wordpress pc windows xampp 8

If the displayed interface has another language different from yours, you can change it in the “Appearance Settings” section. But if all goes well, the phpMyAdmin interface should launch with the default system language.

Click on "DatabasesAbove and to the left and you will be prompted to create a new database. I called mine " WP". When you have entered a name, click on "Create" and close the window.how 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

Unzip WordPress into its own folder and rename it whatever you want. For consistency, I'll call this WordPress install "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 down 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 a password. So if this is the case with you, leave the password blank ""

Save the file and close it.

Now we can move on to installing WordPress.

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

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

how to install local wordpress pc windows xampp 5

Enter your details and click “Install WordPress. "

Log in with your login and voila

Easily create your Online Store

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

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.

Conclusion

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 can also save you a lot of time since you won't have to install and uninstall WordPress every time you test themes and plugins.

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

However, you can also 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 future I hope to be able to find lots of other tips like this one thank you again

  2. Have you tried out Nomad WP (http://www.nomad-wp.com)?
    It's an independent (and free) WordPress environment on your computer or USB drive.
    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 was certainly not appropriate or contained advertising links. those are the two reasons comments are removed on this site.

  3. Hello,
    First of all thank you for the tutorial.
    I have a little problem opening the wp-config.php file, windows cannot open the file and asks me to choose a program from the list.
    Basically with which program to open it?
    Thank you

  4. Interesting article, I did not know this way of installing a cms. Does it always install the latest stable version?

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