How to Install WordPress on Localhost XAMPP Step by Step

How to Install WordPress on Localhost XAMPP Step by Step Featured Image

In this tutorial we will learn how we can install WordPress on Localhost using XAMPP server step by step.

There will be total 5 steps.

At first we will install XAMPP server & then will install WordPress.

Before starting let’s learn some benefits why we need to install WordPress on localhost using XAMPP server.

Why We Should Install WordPress on Localhost using XAMPP Server?

  • For practicing WordPress, localhost is the best place to start
  • As a beginner we don’t need to buy any domain, hosting. So we can start using localhost
  • It takes more time to develop site on live server rather than localhost, because every time we need to upload files to live server after changes done. We can work on live server directly but that’s not good practice
  • So when you work for some real projects for clients, then it’s better to work in localhost first & after all done need to upload it on live server
  • Only you can see the site on localhost
  • XAMPP is compatible for Windows, Linux  & Mac

How to Install WordPress on Localhost XAMPP Step by Step [Total Steps: 5]

We have created total 5 steps to install WordPress & XAMPP.

Let’s we start our steps.

Step 1: Download XAMPP

Go to XAMPP website download it based on your computer operating system.

To show you the process we are using XAMPP for Windows.

Download XAMPP

After clicking link, it will download automatically & if not then click on “click here” link as showing below screenshot.

Download XAMPP Automatically

Wait some time to download it completely.

Step 2: Install & Run XAMPP on Your PC

After completely downloaded file, you can cut that file & save it in a place in your computer so that you can use it later if needed rather downloading it again 🙂

Now double click on that installation file & it will start the installation process.

Install XAMPP Start

Click on Next button & you will see Select Components screen with all options selected.

But we will keep selected Apache, MySQL, PHP, phpMyAdmin only & other options will deselect.

Install XAMPP Select Components

After clicking Next button Installation Folder screen will appear.

By default it will show folder location C:\xampp.

Our suggestion will be not to install in C drive because if you need to setup your PC then all the files & folders will be gone from C drive. So you can select any other drive except C drive.

So we will select E:\wampp for our installation.

Install XAMPP Installation Folder

After clicking Next button Language Selection screen will appear.

Install XAMPP Language

So you can select your preferred language from English &  Deutsch.

We will select English & click Next button.

Then you will get Bitnami for XAMPP screen & click Next.

Ready to Install screen will appear. After clicking Next button installation will start.

Install XAMPP Setup

After installation done you will get Completing the XAMPP Setup Wizard screen.

Install XAMPP Completing the XAMPP Setup Wizard

Click Finish button & XAMPP Control Panel screen will appear.

Install XAMPP Control Panel

From this screen select Start for Apache.

You may get windows security alert for firewall.

Install XAMPP Windows Security Alert Firewall

Click Allow access & then click Start for MySQL from XAMPP Control Panel screen.

You may get another windows security alert for firewall & click Allow access for that as well.

Now you will see green sign for both Apache & MySQL, that means both are running.

Install XAMPP Control Panel Running

So XAMPP is ready for our work.

If you see any other color like yellow then Quit XAMPP first.

Install XAMPP Control Panel Quit

Then start it again from programs & start Apache & MySQL from XAMPP Control Panel screen.

Hope you will get green sign for both Apache & MySQL.

If you have Skype running already then there can be a conflict within Skype & XAMPP. Conflict is caused by both Apache and Skype using the same port 80. To fix this problem you can Quit both Skype & XAMPP. Then at first run XAMPP & then Skype. Problem should be fixed, if not then you can check Tools » Options for Skype if any options there.

Hope you now successfully installed & started XAMPP on your computer.

Now type localhost in your browser & it should redirect to http://localhost/dashboard/ & below page will appear.

Install XAMPP Localhost Dashboard

This means everything is working properly.

Now we will do one thing.

We don’t want that redirect from localhost to dashboard.

We want, for localhost it will show list of files & folders, so that we can choose our required files or folders from there.

To remove that redirection let’s check htdocs folder from E:\xampp & you will find index.php file.

Let’s rename that file something like index1.php or anything else you prefer.

Now if you go to localhost from browser then you will see a list of files & folders.

Install XAMPP Index of Files Folders

So we are all set now, XAMPP is installed & working properly.

Congratulations for successfully installing & running XAMPP 🙂

Step 3: Create a Database in XAMP

So in this step we will create database & that will be needed for installing WordPress.

From your browser go to localhost/phpmyadmin & you will get phpMyAdmin screen.

Create a Database in XAMP phpMyAdmin Screen

If you see any login screen after entering http://localhost/phpmyadmin then Username will be root & Password will be blank (without any password). Then click Go. If no login screen then that’s ok as well. 

From phpMyAdmin screen click on Databases from top.

Create a Database in XAMP phpMyAdmin Database Screen

Under Create database type Database name for example wp_test & then click Create.

Normally we will create database name based on project name. So will be easy to find it if needed.

wp_test should be listed in left side of the screen.

Create a Database in XAMP phpMyAdmin Database Created Screen

So we have created our database successfully.

Step 4: Download WordPress

Go to WordPress.org website & click Get WordPress from top right.

Download WordPress

Then you will get wordpress.org/download page & from there download WordPress & that’s the latest version.

Download WordPress Download Screen

It will be zip file. Now cut or copy that zip file to E:\xampp\htdocs folder.

Then unzip or extract here. Now all files under wordpress folder.

We can rename this folder based on our project name. As this is our test project & database name we have created wp_test so let’s rename folder name as same name wp_test.

Now all files ready to install & database created.

In next step we will install WordPress.

Step 5: Install WordPress on Localhost XAMPP

Let’s go to http://localhost from browser & you will see wp_test folder is listed there.

Click on it & WordPress installation process will start.

Install WordPress on Localhost XAMPP Language Screen

English language is selected by default. Click Continue button.

You will get below screen:

Install WordPress on Localhost XAMPP Database Options Screen

In screen showing we need below information:

  • Database name
  • Database username
  • Database password
  • Database host
  • Table prefix

& no worries we have all these information.

Just click on Let’s go! button.

Install WordPress on Localhost XAMPP Database Information Screen

From this page let’s change fields values like this:

  • Database name will be wp_test
  • Database username will be root (it’s default for localhost)
  • Database password will be blank (without any password & that’s by default value)
  • Database host will be as it is now localhost
  • Table prefix can keep as it’s now wp_

Now click Submit button.

Install WordPress on Localhost XAMPP Run Installation Screen

From this page click Run the installation button to move next.

Install WordPress on Localhost XAMPP Run Installation Information Needed Screen

We can set information like this:

  • Site Title can be WP Test
  • Username can keep as admin
  • Password we need to use strong always when will work with clients real project but here we can use admin123
  • For Confirm Password tick this checkbox Confirm use of weak password (when strong password will be used then this checkbox will disappear)
  • For Your Email you can use your email address. Here we are using wp_test@test.com
  • For Search Engine Visibility tick this checkbox Discourage search engines from indexing this site (we don’t want Google to index this test site, also as it’s localhost Google will not index as well & when site will be fully ready we will uncheck this later from WordPress admin panel)

After all set then click on Install WordPress.

Install WordPress on Localhost XAMPP Successfully Completed Screen

Yes! We have installed WordPress successfully.

Now let’s check how WordPress dashboard or backend or admin panel look like.

Click on Log In & login screen will appear.

Install WordPress on Localhost XAMPP Login Screen

Do you remember Username & Password?

Yeah it’s admin & admin123 & after clicking Log In we will get WordPress admin panel.

Install WordPress on Localhost XAMPP Dashboard Admin Panel

So finally we have landed to our newly installed WordPress admin panel 🙂

Do you want to visit WordPress frontend?

From top left mouse hover on WP Test & it will show Visit Site as dropdown.

Click on it or you can directly go to http://localhost/wp_test/ from browser.

Install WordPress on Localhost XAMPP Frontend Screen

So this is our first installed WordPress site.

We will learn more about WordPress in out next tutorial WordPress Dashboard Tutorial