WordPress Localhost (2020)

In this WordPress post, I will teach you how you can serve your WordPress on localhost or on your computer.

First of all, what is localhost?

In computer networking localhost literally means “this computer”. When you type a URL into your browser, you are essentially connecting to a “host” computer somewhere else in the world. This computer serves you with the web page that you requested. If you type “localhost” into your browser, however, then your browser will know that you want to connect to the computer you are currently using. If your computer is running web server software like Apache, then your browser will be served a web page by your own computer, which is otherwise known as the localhost. Every computer connected to the internet has an IP address and your localhost has one too. Typically the IP address is


Now you know what localhost is, the next question is how do you serve a WordPress site on localhost? Don’t worry this how-to guide will teach how easy it is to serve a WordPress site on localhost.


You should have download a copy of WordPress and already installed XAMPP.

Adding WordPress Localhost into XAMPP

First, start XAMPP and start APACHE and MYSQL module.

xampp control panel

Navigate to where you installed XAMPP, and go into the htdocs folder.

xampp folder

Move your WordPress zip file into the htdocs folder and extract it.

Note: Extract the folder inside the zip, because if you extract the zip itself it will create another folder which leads to, /wordpress/wordpress/*.*.

wordpress localhost

After extracting the WordPress files, you can now rename the wordpress folder into any name you like, remember this name for it will be used on a later step.

Now open your browser and open your phpmyadmin page


Here, we need to create a new database for your WordPress site. Create a new database and name it to any word/phrase you like, remember this name for it will be used on a later step.

Click the “New” link located on the top left of your screen to create a database. And add the name of your database into the first textbox. Then click the “Create” button.

localhost phpmyadmin

After creating your database, we are now ready to setup the wordpress site, enter into your URL bar


Change the wordpress word into the folder name you have set earlier.

This will now proceed to the normal flow of installing a wordpress site. On the database setup page enter the following:

Database: wordpress (Enter the database name you created before on a )
Username: root
Password: (Leave the password field empty)
Database Host: localhost
Table Prefix: wp_

Then proceed with the installation.

That’s it. Congratulations!, You have successfully served your WordPress site on localhost.

Visit WordPress documentation for more details about WordPress pages and more.

Also, please visit my other WordPress How-to Guides.

Leave a Reply

Your email address will not be published. Required fields are marked *