Saturday , November 28 2020

How to install WordPress on localhost – Complete WordPress installation guide

Anybody who wants to start with WordPress gets this question. How to install WordPress on localhost? What other things will I need for this process? So, here we are with a complete WordPress installation guide.

Considering newcomers, we designed and written this article in detail. WordPress is well-known for its easy installation process. Under most circumstances, WordPress takes less than five minutes to install completely.

Many web hosts offer tools to automatically install WordPress nowadays. However, if you wish to install WordPress yourself, the following guide will help.

WordPress is currently one of the best CMS in the market. It grabbed 35% of the overall web world.

Things we will need for installation

1. Web Server (Localhost)
2. WordPress Installation Package
3. Your precious 5-10 Min 


How to install WordPress on localhost (your computer)

Localhost means the server on your local system (your own laptop, computer, etc). We use the localhost to run the web project on your local system. Once the project is ready, developers upload it on the actual server for realtime use.

In order to install WordPress on the localhost, you need a server and database installed on your system. You can install both server and DB with one of the following software.

In below Softwares – Apache is a server; MySQL is a database, PHP is a server-side language. Windows, Mac, Linux are operating systems (OS).

WAMP – Windows Apache MySQL PHP
MAMP – Mac Apache MySQL PHP
LAMP – Linux Apache MySQL PHP
XAMPP – X (Cross OS) Apache MariaDB PHP Perl

Note – Above details are mentioned as on the article publishing date.

1. Download & Install Local Server (XAMPP)

Many users, choose the software as per their operating system. Our WordPress Installation will be based on XAMPP as most of the developers use that only.

XAMPP is a cross-platform software that can be used on any operating system. This is the reason why most of the developers choose XAMPP as a localhost server.


  • Once the file is downloaded, open the installer by double-clicking on software. You might get a warning due to antivirus or user account control settings (UAC).
    Just click on YES or OK.

How to install WordPress - UAC Warning


  •  You will come to an installation screen like this. Click Next.

How to install WordPress - XAMPP Setup


  • It will ask you to select components for installation. My recommended components are as below. You can choose as per your requirement.

How to install WordPress - XAMPP Installer


  • Click Next. It will ask you to select the folder to install XAMPP. By default, it is C:\xampp. But, as C:\ Drive has windows installation, we chose the D:\ drive.The reason is, when you format your system, it will delete the XAMPP folder as well. And we definitely do not want so (as it will have all the projects in it).

How to install WordPress - XAMPP Installer


  • Click Next. It might ask you to select the language. Select as per your need. (No image provided for this step)
  • Click next. It will take you to the below screen. Deselect the “Learn more” checkbox. It is not part of the installation.

How to install WordPress - XAMPP Bitnami


  • The setup is complete. It will ask you “Do you want to start the control panel now?“.
    Select it and click Finish.

How to install WordPress - Start Control Panel


  • Once clicked on Finish, it will open the control panel. The default value for the “Actions” column set to Start for every row. You need to click on Start in front of Apache and MySQL.
  • Once it is started successfully, it will turn green as you can in the below image. The default port(s) for Apache are 80, 443 and MySQL is 3306.

How to install WordPress - XAMPP Control Panel - Start


2. Download & extract WordPress package

As XAMPP is ready, the next step is to download WordPress from the official website

Click on Get WordPress button in the top right corner. It will take you to the download page you can see below. Download the package.

Unzip the downloaded WordPress package.


3. Add WordPress files to project folder

Goto XAMPP installation folder. It is D:\xampp for me. It might be C:\xampp in your case. Installed XAMPP folder will have various folders in it.

Out of these, htdocs is the Document Root folder. Create a folder in htdocs named as “Projects“. Create a subfolder in “Projects” that will be treated as your domain name. It will be in my case.

Goto unzipped WordPress package. Copy the files in the “wordpress” folder and paste them into the folder. It will look like this.


4. Create the database using phpMyAdmin

Go to – phpMyAdmin

You will see “New” in the left-hand sidebar or “Databases” in the horizontal menu bar. You can click on either of the options.


  • Enter the database name you want to assign for your project. Click on “Create” button.

Note – Try not to use the database name similar to a website name (for hacking safety purposes). We used the same as it’s just for example purpose.


5. Install WordPress on Localhost

Go to – “http://localhost/FOLDERNAME/” which is “http://localhost/Projects/” in my case. Be careful while using FOLDERNAME. It should be the same as you created one. Otherwise, it will give you an error.

It will automatically redirect you to the installation page like below.

  • Select the language you want. Click Continue.


  • As you can see in the below image, you need some info before proceeding ahead.
    Click on Let’s go.


  • Enter the details as filled in the below image.

1. Database name – mydomain (Database name you entered while creating it in 4th step)
2. Database username – root (Default value)
3. Database password – keep it blank (Default value)
4. Database host – localhost (Default value)
5. Table prefix – wp_ (Default value)

Click submit.


  • Click on Run the installation. 


  • Fill up the info as per your need.

By default, it has admin as username and password. Most of the developer use that only. That makes it easy for hackers to try with those credentials.

So, always use different usernames and strong passwords. Remember those credentials as it will use to login. You can create a strong password here.

Click “Install WordPress”.

Note – Check the “Search engine visibility” option if your website is still under development process. It restricts search engine robots to gather the website metadata and index the website in search engines (like google, yahoo, bing, etc) as the site is not ready yet.

Once the site is ready to go live, uncheck the box. If you forget to uncheck the box, it will not show the site in search results. So make sure, you uncheck the box.


  • Once the installation is complete, it will redirect you to the success page. The browser might ask you to save a password. Save it. Click “Log in”.


  • Click “Log in”.


  • Welcome to Dashboard

Now you are good to access your website.

Hola..!!! It’s time for Coffee now.


If you are new to the blogging concept and don’t know anything about it, you can start with the following basic articles.

What is a blog? Blogging Basics

How to start a WordPress blog

20 Best WordPress News, Magazine, Blogging Themes

9 Best Ways to Optimize Your Blog Posts for SEO

How to increase WordPress website speed

19 Best Ways to Secure Your WordPress Site


I hope you liked this article. Share it with your friends and colleagues. So they can get started with WordPress easily.



About Author


Check Also

Speed up WordPress website

How to increase wordpress website speed – 13 Tips

You want your WordPress website to be fast..? I guess everybody wants so. Why..? Well, …