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
Simply click on yes and will proceed to the next step
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
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
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
Once click on next it’ll start for installation
Once the installation is finished, open its control panel by clicking on Finish.
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
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.
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.
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.
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
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.
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
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
Now the next step will ask to run the installation
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
Now the wordpress installaton has been copleteled successfully.
I’m Sanjay, a digital marketing professional with 12+ years of experience. I’m also a part-time blogger who writes about various topics. My blog provides practical advice and insights for readers interested in these areas. I’m passionate about sharing my knowledge and always looking for new ways to engage my audience. In my free time, I love traveling and immersing myself in new cultures.