How to Install WordPress on Localhost using XAMPP

In this article, I am going to cover how to install WordPress on XAMPP. WordPress is software to create a website and you need web hosting account for it. Do you know that you can install WordPress on a localhost using XAMPP? Localhost means your Desktop. The operating system doesn’t matter as it supports Windows, Linux and OS X.

But question is, why should someone Install it on a desktop?

Below are some reasons which I can think of,

  • As a beginner Blogger, you want to test the Blog before making live to the world.
  • An Experience Blogger can use it to review WordPress Plugins and Themes and share views with readers.

The best thing about local installation on Windows/Mac/Linux is, you can even host multiple websites on your desktop without incurring any cost.

So let’s see how to install WordPress on XAMPP.

Methods to Install WordPress on XAMPP

There are two methods to install it

  • Manual Installation
  • Using Bitnami/XAMPP installer.


Let’s see each method in details.

Start XAMPP Apache and MySQL Service

Open XAMPP control panel and start Apache and MySQL services as shown below. This is pre-requisite for WordPress Installation.


Manually Install WordPress on Windows

Open WordPress Download Page. It is either a .zip or .tar.gz file. Go ahead and download a zip file and extract to your local machine.

WordPress is built in PHP, HTML, CSS and MySQL as a database. All metadata information like posts, user information, comments, etc are stored in MySQL Database. You need to create a database for WordPress.

Create MySQL User and Database

Start XAMPP and open a web browser and type localhost in URL. Click on phpMyAdmin.On phpMyAdmin click on New to create a new database. Enter Database name – att_wordpress and collation – utf8_general_ci as shown below.


Next step is to create a username for the database. You can see (+)mysql tree on the left-hand side menu. Expand it and locate user table and create on Insert. user table stores information about all user in MySql.


Enter Host, User and Password. Check below a PASSWORD function is attached to the Password field. It will encrypt it after saving. Scroll the page and click on Go at the end of the page to insert records.


It inserts this user information in the MySQL database with all required privilege. Select All Except Shutdown privilege. If you get below warning, ignore it for now.

1 row inserted.
Warning: #1364 Field 'ssl_cipher' doesn't have a default value
Warning: #1364 Field 'x509_issuer' doesn't have a default value
Warning: #1364 Field 'x509_subject' doesn't have a default value

Create Folder C:\xampp\htdocs and Copy WordPress

Create a folder ATT under C:\xampp\htdocs. Please note XAMPP is installed at c:\xampp location on my system. Extract content of all downloaded WordPress files under C:\xampp\htdocs\att folder as shown below.


Now open Google Chrome or any browser and type URL http://localhost/att/.  This starts the installation of WordPress on your system. Select the language of your preference and click on continue.


Installation welcomes you and informs you to have information ready before starting. We have already created user, database. Click on Let’s go!.


Enter database connection details

Enter Database Name, Username, Password, Database Host and Table Prefix as shown below. In the same database you can install multiple WordPress, so you need to specify unique Table Prefix for each installation.



Here enter Site Title, Username, Password and Your Email. Please note that the username and password here are not database username and password. This you will use to login on WordPress Dashboard.


That’s it and you did it…!!!

WordPress is installed on your localhost. Open any browser like Google Chrome, Mozilla Firefox or Windows Explorer and type localhost/att as URL to open Blog as shown below. This is default look and feel, you can use themes to change it.


You can access admin console using URL localhost/att/wp-admin. Enter it in browser and WordPress will ask you to enter username and password (not database) set during installation.


You can see Blog is installed using the default theme. Login to WordPress Dashboard to change the theme, add plugins, write posts. It is your own WordPress installation on localhost.

Download installer from Bitnami/XAMPP website

XAMPP support many add-ons like WordPress, Joomla, Drupal, etc. It is distributed as a wizard-driven installer which is very easy to install. You can download it from here. Make sure Apache and MySQL are started before beginning the installation. Click on a downloaded file to start the installation. It supports 9 local languages. Choose your preference.


This is Welcome Screen for WordPress Installation.


It is smart enough to detect the XAMPP installation on your system. It is c:\xampp for me.


Create Admin Account. You need to enter all necessary information like Login, Your real name, Email Address and Application Password. This login and application password you will use to login WordPress Dashboard. This is local installation, so login name is Admin. Never choose Admin as a username on the site hosted on the Internet. Your site will become an easy target for a Brute-force attack. Where hacker tries to guess the password of your account using admin as the username.


Choose blog name whatever you want. I am keeping it the default for demonstration.


If you want to configure email support, you can do it here.


If you want to deploy on the cloud, you can check this box. For now, let it be unchecked.


That’s it and It will install WordPress on the local desktop.


Post installation you can launch your Blog.


This is how your Blog. You can access Blog and Admin Dashboard using  URLs

  • localhost/wordpress/
  • localhost/wordpress/wp-admin



XAMPP offers a great flexibility allowing you to install multiple WordPress on localhost without any additional cost. Both the method shown above is easy.

Let me know if you found this How to install WordPress on XAMPP article helpful. Go ahead and install it on localhost and become a pro-blogger. Reach out to me if you face any issue.

Related Post


Comments are closed.