How to Install WordPress on Localhost (5 Easy Steps)

As the most popular web platform, WordPress is already powering up over one-third of the entire websites.

Hundreds of people are entering the community every day. If you too are one of them, we are welcoming you with this easy and beginner-friendly tutorial- “How to Install WordPress on Localhost” in five easy steps.

Learning WordPress is just fun. Nowadays, anyone can build a website for his/her blogging-business or any other purposes within minutes. Yes, CMS (Content Management System) made it such easy for all of us. And WordPress is leading the CMS industry with a surprising market share of more than 60%!

In this post, we have shown how to install WordPress on localhost in 5 easy steps. Let's start with this basic question.

Why Install WordPress on Localhost?

A site in a localhost environment is basically for personal purposes, not for users or audience. The only person who can see the site is you! So, why does anyone need to create a site in localhost?

The answer is already given in the above paragraph. Before going live with our site or to make a visual presence, we should learn the basics and test the output of our developed solution. A localhost site lets us check and experience the updates, changes, and settings etc. to be sure about the final outputs.

Basically, developers use these sites to check their works for being sure about the quality and issues on it. But as a user, you too should create and use one or more localhost sites before making any update or adding a new feature.

So, a localhost site actually supports you to prepare for your next final move. Technology is going ahead rapidly so is the software industry. There is no chance to ignore the updating-upgrading process. Here comes the localhost site to the rescue.

How to Install WordPress on Localhost (5 Easy Steps)

WordPress made it easy to install the solution with ease both in a c-panel or localhost. Most of the famous hosting provider companies offer one-click installation for WordPress. But, you need to depend on a localhost web server solution to create a database and save your files when you are creating a local site.

And there is a number of popular solution out there to set up your WordPress on Localhost. To make your job easy, we are mentioning four of the most popular localhost service providers.

  1. WAMP
  2. MAMP
  3. LAMP
  4. XAMPP

In this post, we will show you how to install WordPress on localhost using XAMPP. This localhost server is famous for its overall support and quick response. You can install WordPress using WAMP, LAMP or MAMP, following the same way.

These are the software that creates localhost on your PC by utilizing web server software Apache, PHP and MySQL. You may know-

PHP is a programming language and MySQL is a database management software. Both of them are required to run a WordPress site.

Installing each of these software separately is difficult and time-consuming for beginners. That’s why you need to depend on the solution like XAMPP/WAMP/LAMP/MAMP.


Among these solutions, XMAPP and WAMP are open-source and provide a free solution.

XAMPP is better than WAMP because it's compatible with all the available operating systems like Windows, OS-X, and Linux. On the other hand, WAMP is limited only for the Windows operating system.


LAMP and MAMP are also open-source based free localhost solution and provide good support. But the problem is LAMP stands basically for Linux operating system and MAMP limited only for Mac operating system.

So, which one is better compared with the others? You could find XAMPP as the best suite for any of the operating systems with its lots of features.

Now, lets start with the first step.

Step 1- Download XAMPP

  • There are different versions for different operating systems. Choose the perfect one for your device.
Download XAMPP

After clicking on the download button, wait for a few moments. It's around 150 MB file, so you should give some time for it to get downloaded.

Step 2- Install & Run the XAMPP on Your PC

This is the second step. After downloading the software, you need to unzip it. When the file is ready, just select the Install button or click on it twice. Soon you will discover that the installation process has began.

XAMPP set up
  • In the next step, you will see some checkboxes these are already marked. You only need MySQL and phpMyAdmin, so unmark all the others.
MySQL and phpMyAdmin
  • After a few moments, you would see a welcome notice. That means your installation process is working perfectly.
Welcome to XAMPP
  • If you have any antivirus software installed in your PC, you may see a security alert like this. Don't worry, check any of the given networks and go ahead by clicking on the Allow access button.
XAMPP security
  • You would see a language selection option, check one that you want and click on the Save button.
  • You are almost at the end of the installation process. Just mark this question box and click on Finish button. The XAMPP control panel will automatically run on your device.
Install XAMPP

Congratulations! You have completed the XAMPP installation process!

Step 3- Download WordPress Latest Version

Now is the time to create a database and start installing WordPress on localhost. To do that, you need to download the latest version of WordPress.

  • Go to the WordPress official website, click on Get WordPress button from the top right side. You will be redirected to a new page.
  • Now hit on Download WordPress button.
Download WordPress

The download process might take a few moments to begin. You will get a zip file. Unzip the file and copy that for your next uses.

Step 4- Create a Database

To create a database, first you need to prepare a folder on your PC in which you want to save all the data of your local site.

  • Go to your local disk, where you saved the downloaded XAMPP file.
  • Select the htdocs folder and paste the WordPress latest version you have copied earlier.
Htdocs- How to Install WordPress on Localhost

Now, rename the WordPress folder. You can avoid this option, if you want to build your site with the name ‘WordPress' itself.

We named the folder here ‘mytest'. Check the below screenshot. You should remember the name you have selected for your database.

Rename WordPress- How to Install WordPress on Localhost

  • Select Database
  • Write the same name you have written on your local disk. And finally, click on the Create button. Your database will be created within a few seconds.
Database name- How to Install WordPress on Localhost

You have successfully created your localhost database. Now, is the turn to install WordPress on the localhost.

Note: Before going to the final step, you need to start both Apache Web Server and MySQL Database from the Xampp control panel installed on your PC or Mac. Without starting both of them, you can't get access to PHPMyAdmin.

Just go to your app folder. Select the Xampp control panel and click on MySQL and Apache buttons. Have a look at below screenshot.

Activate Apache Web Server and MySQL Database

Step 5- Install WordPress on Localhost

Open a new tab on your browser and write localhost/your given name (‘mytest‘ in our case) and hit on the Enter button. You will see a WordPress setup wizard like below.

  • Select your language and click on continue
WordPress language
  • You would see a welcome notice on behalf of WordPress. On the next step, WordPress will require
  1. A database Name
  2. A user name
  3. A password
  4. And a database host
  • Just click on the Let's go button
WordPress database
  • These are the fields you can see in the below screenshot.
  • Provide your database name, you can write ‘root' as user name, keep the password option blank- it's better and you would find other fields filled up from earlier.
  • Click on Submit button
WordPress settings
  • This is your final step of installation.
  • Give a name to your site. we named our site WordPress ERP here. You can also keep your database name as your site's name.
  1. Write your user name
  2. Give a strong password
  3. Write your personal e-mail address
  4. Carefully check the search engine visibility button. Otherwise, Google would start indexing your local site too!
  • And, finally click on Install WordPress button!
How to install WordPress on localhost

Yes, you have completed you installation. You should see a notice like below.

How to Install WordPress on Localhost

Check out the Site You Have Built

This is the time to check out your local site. How would it look like or how would it work? Give a check.

  • This is your backend dashboard or admin panel, from where you would control everything.
backend dashboard- How to Install WordPress on Localhost
  • And this is your front-end dashboard.
frontend- How to Install WordPress on Localhost
  • You can check this by adding a new blog post or installing and activating a plugin/theme etc. We have published a blog post, it looks just like a live site- isn't it?
final output- How to Install WordPress on Localhost

So, this was the total process of building a personal testing site on a localhost environment. The process requires 5-10 minutes based on your capability.

Get to know 100+ interesting stats and facts about WordPress, from the article below.

Wrapping up on How to Install WordPress on Localhost

As CMS made it easy to build a website for people of any background, you can consider it as fun. Yes, building a website with WordPress is so easy these days. You already know- how to install WordPress on localhost, so it's your turn to build a site for learning WordPress or checking/testing any plugin/theme/update, etc.

WordPress started it's journey just as a blogging platform, but over time it became the most powerful web platform for all sorts of websites. You can easily build an online shop or even a multi-vendor marketplace at completely free of cost!

So, give it a try and let us know in the comment section below if there is any confusion. We are always here to help!

22 thoughts on “How to Install WordPress on Localhost (5 Easy Steps)

  1. WordPress News Hub – How to Install WordPress on Localhost (5 Easy Steps)
    March 22, 2019

    […] Read Full Article […]

  2. Ataul Haque
    March 26, 2019

    Abbreviation of XAMP and MAMP is interchanged. Mac should be in MAMP instead of XAMP. Great article for beginner.

    1. Sakil Adnan
      April 2, 2019

      Thank you Ataul Haque, for your kind information!

  3. Essential WordPress Development Tools You Should Know About
    May 7, 2019

    […] one reason or the other, you may want to reset your WordPress site to default. This single button will erase all the files on your site back to how it was when […]

  4. Easily Migrate WordPress From Localhost To Live Server
    May 23, 2019

    […] place in the local development environment (A.K.A. localhost). Developers have the option of using XAMPP (Windows) or MAMP (Mac) to build WordPress powered […]

  5. JD
    July 1, 2019

    Hello and thank you for your efforts at writing this nice article.
    If I want to test and/or build a number of completely different WP websites, how do I go about it please? I’m sure there’s a way and I don’t have to delete the WP folder and database just to start again.

    1. Sakil Adnan
      July 4, 2019

      Hi JD!
      Thank you for your appreciation.
      With the same localhost provider like XAMPP or WAMP, you can create multiple WordPress sites. You don’t need to delete your previous one. Just rename your new downloaded WP folder when creating the database.
      If your running one is WordPress or Mytest as I wrote in this post, name your next one as WordPress1, WordPress2 or Mytest1, Mytest2 and go on.
      Thank you and Have a good day!

      1. JD
        July 15, 2019

        Thanks for the explanation. Do you mean that I will duplicate and put inside the htdocs folder, the WP folder I had downloaded and unzipped everytime I want to have a different website?

        Then also create a new database for each website, using the same name I gave each WP folder placed in the htdocs folder (should WP folder name and DB name be lowercase)?

        Lastly, in a situation I wish to use a backup plugin to backup production as a way to move website to Live server, will there be issues of the plugin identifying what db folder to copy as well issues with db username, password etc – I’m just asking (i’m not really techie) 🙂

        I came across someone who said it’s not good to go from offline production to Live Server because the parameters like SQL or PHP may be different, what do you think about that?

        Thank you so much for everything.

        Oh yes! I’m not sure your comment section sends any notification to users who comment on your site.

        1. Sakil Adnan
          July 17, 2019

          Hi JD
          Thanks for your queries.

          Yes, you are right. You can duplicate or download if that doesn’t work.

          Normally we use lowercase, but that’s not actually an issue. Just keep both of WP folder and DB name the same.

          And yes, you can definitely use the backup plugin. What you have listened, not true. Moving sites from localhost to live is an easy, safe journey; takes only 10-15 minutes. You can follow this guide to perfectly move your local site and get all your data.

          And finally, yes you will get a notification each time in your email from our comment section automatically.

          Thank you so much. Have a good day!

  6. Shehroz Naeem
    August 21, 2019

    Thankyou very much Sakil. Btw your website design is so awesome

    1. Sakil Adnan
      August 21, 2019

      Hi Shehroz!
      You’re welcome.
      Thanks for your comment and appreciation.
      Have a nice day.

  7. Patrick
    August 29, 2019

    Hey folks, great tutorial!

    However, I found a missing step after the XAMPP installation. I ran into an error when trying to get access to ‘localhost/phpmyadmin’ – I forgot to start both Apache and MySql in the XAMPP control panel.

    I think you should include this step here as well, other visitors may not know what to do to get access to phpmyadmin.

    Thanks and have a nice day 😉

    1. Sakil Adnan
      August 29, 2019

      Hi Patrick!
      Happy to hear that you found my article helpful. Thanks, both for your appreciation and suggestion- it was really important. I have updated my post.
      Have a nice day!

  8. agammahardi
    November 8, 2019

    thank you sir, you just start my big plan

    1. Sakil Adnan
      November 11, 2019

      You’re welcome Agammahardi, it’s our pleasure.
      Do with us by subscribing to our weekly newsletter.
      Have a nice day!

  9. Olga
    December 9, 2019

    Thanks a lot! I succeeded with installation because of this article, tried before twice fruitlessly.

  10. PressTigers
    December 30, 2019

    This is a good source of knowledge. I came to know these types of website server solutions and installation procedure for wordpress localhost.

  11. Ritesh Bindal
    January 10, 2020

    Making my travel website with your help. Thanks

    1. Sakil Adnan
      January 14, 2020

      And you’re welcome Ritesh. Have a good day.

    2. Sakil Adnan
      January 15, 2020

      And you’re welcome!

  12. Sayan Choudhury
    February 20, 2020

    wow nice content. Thanks for sharing this with us

    1. Sakil Adnan
      February 24, 2020

      Happy to hear.
      Thanks, Sayan…

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.