How to install WordPress on localhost in 4 easy steps

install WordPress on localhost

WordPress is the most used platform for websites and blogs. New users or learners using WordPress on live hosting is not a good idea as you can damage the website and need a developer to reverse the damage done. 


The better idea is to practice your WordPress website development on your localhost on dummy websites, so you don’t need hosting or a domain.


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

Step one

Step one is to download the WordPress file from their official website. You will get a zip file named WordPress-5.6.1, which is the latest version of WordPress. Unzip the file and save it.

download WordPress

Step two

To create a hosting atmosphere, you need to download software called XAMPP. The next step is to install the XAMPP on your PC, and you will get a window like the below picture after installation.

xampp install

Click the start buttons for Apache and MySQL, and leave other three as it is. Apache works as the localhost, and MySQL operates as the database. 

Step three

Now copy the unzipped WordPress file and go to your local drive C. You will find a file named xampp; under the xampp, you will find a file named htdocs. Paste your WordPress file there, and you can rename the WordPress file to anything. The name of the file will be your website name.

Step Four

Create a database for your website. Just type ‘localhost/PHPMyAdmin, and it will open the Myadmin page where you can create a database for your website. You can choose any name but remember the database name as you have to link to WordPress when installing it on localhost. After creating the database, close the tab.

Open a new tab and type ‘localhost/your WordPress file name’; it will open the WordPress install window. Select your language and click continue; you will be prompted to the database connection details page. Enter the details as below image.

WordPress install
Then you will be prompted to the site setting page, where you have to enter details for the website. If you are confused, then the previous one was for the database, and this one is for the website.
wordpress install

Hit the Install WordPress button, and you are all done, and now you can open the dashboard of your website, which has been created with the default theme and dummy text.

Wrapping up

In this post, we discussed how to install your WordPress website on localhost. Next, we will get deeper into customizing your WordPress with different and popular themes like Astra and Oceans.

If you have any comments or suggestions, then you can comment below or contact me directly.

Leave a Comment