How to install WordPress on XAMPP

WordPress is the most commonly used CMS (Content Management System) for making Blogging websites. If you want to make a website offline and test it on your local computer (i.e,locally) then you can use Xampp that acts as a server (localhost) for your website and makes it easy to test a website offline on your computer that is created using WordPress.

Advantages of creating a website locally:


a) Test your code- If you are one of the tech-savvy’s and have designed your website using coding languages you need to make sure that your code is running absolutely fine before your website goes live on the Internet.

b) Test your WordPress website- If you are lazy like me & don’t like coding or if you don’t know the coding languages, you can use various CMS to design your websites. Just to make sure that your website is running smoothly you can definitely check and test it by installing it on the localhost.

c) Themes & Plugins- You can check the compatibility of your design, theme and plugins to make sure that none of them are slowing down your website's functionality.

Steps to install WordPress on XAMPP:


Step 1: Download XAMPP on your local computer
Step 2: Steps to install XAMPP on your local computer
Step 3: Download WordPress on your local computer
Step 4: Install WordPress on XAMPP


Download XAMPP on your local computer:


XAMPP means(X=> Anywhere(cross-platform),A=> Apache server ,M=> MySql database ,P=>PHP ,P=>Perl)

It is an open source(free) package that provides the ability to your local computer to act as a server for your website that you creating offline on your computer. It helps the user to manage both the front end(design) as well as backend(database) of a website from your local computer. It works on all platforms like Windows, Linux and Mac that is why it is called cross platform application.

You can download XAMPP from here:Download Xampp.


Steps to install XAMPP on your local computer:


Step 1) Run the XAMPP setup and click on next button.

click on next in xampp setup

Step 2) Select the XAMPP modules that you want to install.

select xampp components and click on next

Step 3) Browse and select the folder where you want to install XAMPP on your local computer and after that click on next button.

browse the folder where you want to install xampp

Step 4) Now wait till the installation is complete.

Once XAMPP is installed you need to open XAMPP control panel.

open xampp control panel

Step 5) Now firstly you need click on Start button present in front of Apache and then mysql from XAMPP control panel.

start apache and mysql from xampp panel

Step 6) Once you have enabled Apache and Mysql then you need to open admin panel of apache(server/front- end) by clicking on Admin button and admin panel of apache will open in a new window with the URL: localhost/dashboard

Now you need to open admin panel of mysql(database) by clicking on Admin button and admin panel of mysql will open in a new window with the URL: localhost/phpmyadmin

Step 7) Once you have redirected to phymyadmin, you need to create a new database by clicking on "new" database present on the left side and then you are redirected to database section and you need to create a new database by giving a specific name of your choice and then click on "create " for creating a database.

create a new database in phpmyadmin

Step 8) Now you need to grant privileges to the database by creating a new user that can access and make changes in the database. For that you need to select the database that you have created and then click on "privileges" .

select your database and grant priviliges by creating a new database user

After that you need to click on "Add user account" for creating a new user.

Step 9) Now you need to fill the following fields under Login Information:

User name:(name of the user given by you)

Host name:(select the name of the host as local i.e; localhost)

Password:(set the user password by you)

Re-type:(retype the password same as password).

fill new database user login details

Step 10) Now Scroll down to Global privileges and check the check box of "Check all" that selects all the privileges listed in the privileges section.

check all the privileges for database user

Step 11) Now press on "Go" button at the bottom.


Download WordPress on your computer:


WordPress is a open source and most popular CMS used for making websites. You can easily make a website by using various themes, plugins etc that adds functionality to your site.

You can download the latest version of WordPress from WordPress.org from here:Download WordPress


Install WordPress on XAMPP:


After downloading the latest version of WordPress on your local computer you need to install it on the localhost. Please follow the following steps for installing WordPress on XAMPP.

Steps to install WordPress on XAMPP:


1.) Once the WordPress package has been downloaded you need to extract the zip folder and copy the extracted folder to the htdocs folder inside the XAMPP directory folder.

copy wordpress folder inside htdocs folder in xampp directory

2.) Now you need to open WordPress directory folder in your Apache panel by typing URL: localhost/wordpres in your browser for beginning the installation process of wordpress.

open wordpress directory folder in the browser

3.) Now WordPress installation page will appear in front of you, where you need to select the language in which you want to install WordPress and then click on continue.

select a language while wordpress installation

4.) Now a note will appear that states that while installing process the changes are made in the WordPress configuration file i.e; wp-config.php. So you have to edit wp-config.php file that includes database name, username, password and host.
Open wp-config-sample.php i.e. sample configuration file present inside WordPress folder that is located inside the htdocs folder in xampp directory at C:\xampp\htdocs\WordPress.

Now locate the following code in wp-config-sample.php and enter the information that you have used while installing XAMPP i.e; your database name, database username, database password and host.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'yourdatabase_name');
/** MySQL database username */
define('DB_USER’, 'yourdatabase_username');
/** MySQL database password */
define('DB_PASSWORD', 'yourdatabase_paaword');
/** MySQL hostname */
define('DB_HOST', 'localhost');


Now save the file as wp-config.php .

and after that click on let's go.

5.) Now here you need to enter the database connection information(wp-config.php) same as you have entered above in wp-config-sample.php :

Database Name: (enter the name of the database that you have entered in wp-config-sample.php)

Username: (enter the name of the database username that you have entered in wp-config-sample.php)

Password: (enter the password that you have entered in wp-config-sample.php)

Database Host: (select “localhost” from the select box)

Table Prefix: (don’t make any changes to this)

enter database connection information as directed

After that click on submit button to start the installation.

6.) Now again you are redirected to choose language section where you need to select the same language as you have selected earlier at the beginning of the installation and then click on continue button.

7.) After that you are directed to the next page where you need to fill the following information as required:

Site Title:(eg: My First Blog)

Username: (Enter the Admin username)

Password: (Enter the Admin password eg: use auto-generated strong password)

Your Email: (eg: yourname@gmail.com)

enter wordpress site and login information

After filling all the above details click on "Install WordPress" button for finishing the installation.


Congratulations! WordPress is successfully installed on your computer.