How to Install WordPress on Localhost with XAMPP?

Install WordPress on Localhost with XAMPP

If you want to install WordPress on your PC, then you are in the right place. Here you will learn how to install WordPress on Localhost with the XAMPP Software.

Why use XAMPP Software to Install WordPress?

To install WordPress on your PC, you have to convert your PC into a server. Also, since WordPress is written in PHP and uses MySQL DB, therefore PHP and MySQL DB must be installed on your PC.

But, you do not need to install those applications separately, XAMPP software will easily install those applications at once, and it is FREE.

XAMPP comes with – Apache Server + PHP + MariaDB + Perl

Follow the below steps to install the WordPress on localhost

1. Download and Install the XAMPP

Go to XAMPP Official-Site and download the latest version of XAMPP according to your OS (Mac, Linux, Windows).

Download Xampp for creating localhost to install wordpress

Install the XAMPP after downloading it, and it is easy to install. But if you need help to install it, the official website provides very well documentation of the XAMPP installation.

Below, the resources of XAMPP installation are given –

2. Start the Apache and MySQL server

After installing the Xampp, run this software and then start the Apache and MySQL server.

Start Apache and mysql

3. Create the Database

typing the following URL on your Browser to open the the phpMyAdmin.


Now at the left side, click on the New to create a new database for your WordPress website.

create new database

Enter your Database Name and select the collation to utf8mb4_unicode_ci, and then click on the Create button. The Database name is totally up to you, but you have to remember this name.

creating database

4. Create your site folder inside the htdocs

Now inside the Xampp htdocs folder, you have to create a folder for your new site.

So first, open the Xampp htdocs folder. you can find this folder inside the xampp folder.

Shortcut to open the xampp folder – On the xampp control panel click the Explorer.

xampp folder explorer
localhost htdocs folder

Go inside the htdocs, and here create a new folder and named it whatever you wish, but you have to remember this name, because you can access this local WordPress site through this name.

create localhost wordpress site folder inside htdocs

5. Download and Extract the WordPress zip file

Download the WordPress inside the newly created folder from WordPress.Org, and then Extract the WordPress zip file into the current folder.

download latest version of wordpress
extract the wordpress zip file

Now go inside the wordpress folder and cut all the things and paste into your main site folder.

cut all the wordpress files and folders
paste the worpress files into the root folder
file pasted

6. Install your local WordPress site on your localhost

Now in your browser, type the following URL –


In my case –


After that, Choose the language and click Continue, and then click Let’s go! button.

wordpress install choose language
let's go to install wordpress on localhost

  • Database Name – Enter your Database Name, in my case my_site_db_name.
  • Username – by default the username is root.
  • Password – by default the password is empty.
  • Database Host – localhost.
  • Table Prefix – for the local site it’s ok to go with the default (wp_).
enter the database informations
run the installation

  • Site Title – Enter your site title.
  • Username – Enter your username.
  • Password – Create a new password.
  • Your Email – Enter your Email ID.

You must have to remember the username and password, otherwise you will not be able to login to your WordPress dashboard.

enter the localhost wordpress site infromation
login to your wordpress dashboard
localhost wordpress login form
localhost wordpress dashboard after installing

To see your site – at the left side hover your mouse on your site title and click Visit Site.

visit localhost wordpress site

How to login to your WordPress dashboard after logout?

The default WordPress Dashboard login URL is


in my case –

wordpress admin login url

Congratulations on successfully installing WordPress. Check out the must-watch tutorial – What are the Essential Settings of WordPress you have to do after Installing the WordPress.