How to Install WordPress Locally with XAMPP

How to Install WordPress Locally with XAMPP

why the local host is required because you can test any domain in localhost before live, once the test is completed then you can proceed to buy a host and domain name, and it’s completely free when we run a domain on localhost.
In our previous topic, we have discussed How to Install WordPress on Cpanel through Softaculous

why Localhost

if we’ll discuss localhost it’s a simple hostname that means this computer. It simulates the hosting server on your own computer. by using localhost we can install and run WordPress on our computer.

Step by step procedure to Install WordPress on Localhost With XAMPP

Step One: Download and Install XAMPP

Our first step will be to download XAMPP from the official website. once it is finished then we should open the program to install it on our system. if any antivirus is previously installed then you may get a message like below

image 47

Simply click on yes and will proceed to the next step

image 49

Simple click on next and will proceed for the next step

Two following components are required to install WordPress on localhost, one is “MySQL” and another one is “phpMyAdmin” so we have to make sure to check both of them

image 50

Other components are not required. so simply we can uncheck them and click on the next
In the next step, we have to choose the path for the installation. so its recommended to choose the default path and will proceed to the next step

image 51

In the next step, “XAMPP” will ask you would like to install Bitnami as well. so simply uncheck and will proceed for the next step

image 52

Once click on next it’ll start for installation

image 53

Once the installation is finished, open its control panel by clicking on Finish.

image 54

Now we have successfully installed XAMPP on our computer.

Step Two: Running XAMPP and Testing it

Now it’s time to run the XAMPP and will test it if it’s installed correctly or not. we have already discussed above that two major components are required for the installation of WordPress on localhost. that is:

  • MySQL
  • Apache (phpMyAdmin)

if the color starts looking green then everything is fine and the modules are installed correctly

image 55

Now we can check if the local host is working properly or not, just by typing “http://localhost” on the browser and will press enter. you should find the below following page.

image 56

Step three: Adding WordPress on localhost with XAMPP

To install WordPress on localhost with XAMPP, we need to download WordPress from the official website.
Once the download is completed, we have to proceed XAMPP root directory, just hitting the “Explorer” folder on the XAMPP control panel and will look for “htdocs” folder.

image 57

we need to open the htdocs and will create a new folder for the local WordPress press site. for example, in my case, “mydemosite” is the folder name and the following URL would be:http://localhost/mydemosite
After creating this folder, you must unzip the WordPress you have downloaded into the folder.

image 59

Step Four: Creating the Database

In this step we need to create the database, it doesn’t matter whether you install WordPress locally or on a server. so in order to create a database, we need to jump the XAMPP control panel and will hit on “admin” to open PHPMyAdmin

image 60

You have to click on the database on the top to create a new database. it is not the same as the live version so, there is no need to create a username for the database.

image 61

Step Five: Installing WordPress

In this step we’ll install WordPress, after adding the WordPress files and creating the database, we can use any of the web browsers to open localhost URL and will start the installation process

http://localhost/mydemosite (mydemosite is the folder we created in the htdocs folder

image 62

The major difference between live WordPress and locally hosted WordPress is a database. so we have put the following details for locally hosted wordpress

Database Name: The name you created in the previous step.
Username: root
Password: Make sure it should be blank

image 63

Now the next step will ask to run the installation

image 64

In this step, we’ll put all the mandatory credentials to proceed to the next step for the installation of WordPress

  • Site title
  • User name
  • Password
  • Confirm Password
  • Your email
image 65
image 66

Now the wordpress installaton has been copleteled successfully.