How To Install WordPress on Localhost for Offline use (4 Ways)

Install WordPress on Localhost
  • Save

WordPress is worlds#1 CMS, and if you are like me who likes to try new things on WordPress, it’s always a good idea to get a local installation of WordPress on your system.

You can use it to try new WordPress plugin, making changes in your theme and many more task. I

n fact, if you have seen WordPress videos on my YouTube channel, you would notice all the videos are created on local WordPress installation.

We have been talking about self-hosted WordPress a lot, though many BlogSpot users still feel WordPress as an alien platform because they are not familiar with it.

To get familiar with WordPress, you can start by creating a free account on, or you can install WordPress on your computer to test it on the Local environment.

Benefits of installing WordPress locally:

  1. Familiar with WordPress
  2. Familiar with database
  3. Make changes locally and then make changes on live site
  4. Local test platform as a staging site

How to create a localhost WordPress Installation:

There are many ways by which you can install WordPress on localhost for offline use. Here I’m covering some of the most popular once:

  1. WAMP
  2. XAMPP
  3. LocalWP
  4. InstantWP

Lets start with WAMP

How to install Local WordPress on WAMP:

Install WordPress Locally Using WAMP
  • Save

To start with a local WordPress installation, you need to download a software name WAMP. And also, download Latest release of WordPress.

Subscribe on YouTube

So, let’s get started with WordPress WAMP Installation

1. Install WAMP on localhost

In the PHPmail option while installing WAMP, leave it as it is

2. Now extract the Create a folder under C:\wamp\www name it as WordPress copy all the files and folders under WordPress folder in C:\wamp\www

3. Start WAMP and start all the services by left clicking on it in the taskbar.

4. Open http://localhost/

5. Click on PHPMyAdmin and create a database for your WordPress install.

Steps to Install WordPress Locally on Windows PC
  • Save

(Alternatively, simply click on the WAMP’s icon in the on your desktop and then click on PHPMyAdmin option as shown in the following screenshot)

Start WAMP
  • Save

The screenshot given below describes how to create a database within the PHPMyAdmin page.

Create Database
  • Save

6. Open http://localhost/wordpress and click on create a configuration file.

Create Config File
  • Save

7. Click on “Let’s Go” option to move further.

Install WordPress
  • Save

Now Enter the details as mentioned.

  • Database name : Database name you have created (WordPress)
  • Username : root
  • Password : Leave it blank
  • database host : Keep it default (Localhost)
  • Database prefix : Keep it default (wp_)
Steps to Install WordPress Locally on Windows PC (4)
  • Save

You can also observe the following screenshot for reference to this point.

7. Click on Submit. On next screen click on Run setup.

8. On the next screen add Blog title and Email. Search visibility will not matter here as we are working on the Local environment.

Website Information
  • Save

9. On the next page, you will get the success message that WordPress has been installed. Click “Login” to continue.

WordPress Login
  • Save

Viola! You have just created a local WordPress test environment using WAMP.

How to Install WordPress Offline using XAMPP

1) Download Xampp for Windows from the official website

Download XAMPP
  • Save

2) Install Xampp with Apache and MySql services.

3) After the installation, run Xampp Control panel and start Apache and MySql services as indicated in the image below.

XAMPP Control Panel
  • Save

4) We need to configure MySql Databases, Open your web browser and go to http:://localhost.

Select the language of your choice and then go to http://localhost/security/index.php & there change MySql database password.

XAMPP for WIndows
  • Save

In this tutorial, I have given the password as test. (Password is case-sensitive)

5) Now we have to create  MySql Database tables for your WordPress install.

To do this Go to http://localhost/phpmyadmin, Login using root as username and test as password, or the password which you gave in the previous step.

Create a new database through the PHPMyAdmin interface. Give a name for your database and don’t change any other setting (refer the Image below).

Create Database
  • Save

6) Now, download the latest version of WordPress from

After the download, go to the folder where you installed Xampp, there you will find a folder by name htdocs, open it and extract the latest version of WordPress there.

htdocs Folder
  • Save

7) Open the WordPress folder (the one which you extracted in the above step), you will find a file by name wp-config-sample.php, open the file with notepad++ and edit the data as per the image.

wp-config file
  • Save

Save the file and rename it as wp-config.php.

8)Now go to http://localhost/wordpress and install WordPress!!

Website Information
  • Save

Now simply go to wp-admin and start playing with your offline WordPress blog. You can do various things with local WordPress blog, as you can try making changes locally before making anything live on the online server. Most of WordPress developers, have WordPress installed on their personal laptop/computer, for making quick changes.


  • Save

LocalWP is a local WordPress development application by Flywheel, a popular web-hosting among developer and agencies. You can read my Flywheel review to learn more about them.

Flywheel offers a software called “LocalWP” which offers local WordPress installation on Windows and Mac. 

You can create unlimited WordPress dev environment.

Below video tutorial will help you learn everything about this free tool:

Subscribe on YouTube

Moving on to the last method…

Offline WordPress Installation using InstantWP

How to use WordPress Offline
  • Save
How to use WordPress Offline

This is another popular alternative to WAMP and XAMPP, for WordPress localhost installation. This is a downloadable file, which is idle for non developers, who are looking to use WordPress offline.

You can read about Instant WordPress by InstantWP here.

You can also use XAMPP to install WordPress Offline, but I prefer WAMP over XAMPP. If you are setting up a test server for your team, you can grab unlimited web hosting like SiteGround and install more blogs in subdomain or sub-directory and use it for testing.

If you are stuck anywhere or find issue with installing WordPress using WAMP, do let me know via comments.

You can also refer to our WordPress guide for more such tutorials. If you find this guide useful, do share it on Facebook and Twitter.

Was this helpful?

Thanks for your feedback!
  • Save
Authored By
A Blogger, Author and a speaker! Harsh Agrawal is recognized as a leader in digital marketing and FinTech space. Fountainhead of ShoutMeLoud, and a Speaker at ASW, Hero Mindmine, Inorbit, IBM, India blockchain summit. Also, an award-winning blogger.

59 thoughts on “How To Install WordPress on Localhost for Offline use (4 Ways)”

  1. Nittyananda

    After installing wampserver when I am going to keep the localhost in online by pressing put online it is giving an massage like this “couldn’t excute menu item (internal error)[Exception] could not perform service action.The service not been started” How I can solve the problem.

  2. Mohammed Basheer

    Very good explanation , but still i have a problem ! ! ! ! … The problem is … i had Xammp on my system and without uninstalling it , i installed WAMP … So i check wamp the i uninstalled Xammp and tried to use wamp , but not working and it was always on orange colour icon on system tray … i did all these things that you said and still , not working ! don’t know what is the problem … can you tell me what should i do !?! 

  3. Farhan

    Hi Harsh, I did all accordingly. Everything was right but when I imported the database into phpMyadmin all it shows is a simple white screen. Before the database, it was showing sample post etc. but problem rose after the database export. Can you suggest something?

  4. lodewijk

    Hi thanks for such a well written tutorial, it is technical but you explained it so well, it was not that difficult, thank you so much. Its my first time I’m using WP. So, please forgive my stupid question, I have installed WP successfully and was in by the dashboard, but now when I exited my browser I have no idea how to get back there, I don’t see a WordPress icon.

    Thanks you.

  5. Denis

    I stuck on the number 6. localhost/wordpress…i can’t open it after i make the database in myphpadmin…

    1. andrew

      same thing. stuck on number six. please how do i proceed

      1. Simone George

        I was also stuck on step 6 because somehow the wp-admin folder was not extracted from the zip file. I was getting the error: Not Found The requested URL /mysite/wp-admin/setup-config.php was not found on this server. I am not sure if this is what you are experiencing. For step 2 I simply copied the zip file to the www folder, right clicked and selected extract here. I then renamed the top level folder from “wordpress” to “mysite”, though this is not necessary. The screen to create the config file then loaded without error. Hope this helps.

  6. shrad_k

    I want to move a site from xampp server to wamp server how to achive it?

    1. Ankit sethi

      Hi SHRAD,
      You can shift your website from xampp from wamp very easily by allowing two separated port number for both xampp and wamp. You need to change PORT no for apache and mysql for WAMPP. It’s need to do small change in http.conf file. Also do this with wamp also.

      1. Ankit sethi

        Hi SHRAD,
        You can shift your website from xampp from wamp very easily by allowing two separated port number for both xampp and wamp. You need to change PORT no for apache and mysql for WAMPP. It’s need to do small change in http.conf file. Also do this with wamp also.

        This is ankit from

  7. Vikash Shandilya

    I tried your post to install wordpress and successfully installed on wamp.

  8. Rajesh Thakur

    Harsh Try this

    This plugin you don’t need to do any of this if cloning just create package of live website download it and run step by step of php script and your site will be cloned on local in a minute. I tried it and works for me. Let me know if works for others.

    1. Harsh Agrawal

      Just saw the video demo of this plugin, and it looks impressive. Will give it a try 🙂

  9. Scott H.

    I have to give you props man. This is the easiest and most simple install to do. I used to do a lot of my testing just using a sub domain but this makes things a lot more clean and does not hog my hosting servers. Plus, there is no rush to get a project done. I can work on it in more detail.

    Total install took less than 4 minutes.

  10. sreekanth boddireddy

    can you explain how to do the same on Linux ?

  11. Gautam Doddamani

    i use xampp and i think it is a powerful tool…i have reproduced my live site exactly as it is on my local xampp..i usually use it test 3rd party plugins and to make some ui changes often!

  12. Mike Thornley

    I have WAMP & a locally hosted blog. I can view my blog in WAMP, through localhost but I cannot update the theme and until I deleted my .htacess file, I couldn’t see images either. This has led to me needing to upload the blog live, which as you can imagine isn’t idea, eespecially when I have a copy on my hard drive.

    Please help and thanks in advance.

  13. Ranjitava Biswas

    I tried to install WordPress on Locally on WAMP but received the error message “Error establishing a database connection”.
    My default web browser is Mozilla Firefox.
    Please advice.

  14. Godfrey Onen

    Thank you soooo much! my friend, i have tried to install wordpress using wamp but invain for two weeks man!
    Most advice could not work but you know the secret. To leave out the password blank and username: root.
    Now i shoutyouloud, Yeeee!
    That was it.

  15. John

    I was trying to follow someone else’s install tutorial for the last few hours and no success. Tried yours and all went fast and smooth.
    From extreme frustration to bliss in about 5 minutes.
    Many thanks.

  16. David

    I’m short of words. But you’re the BOMB!!! You just saved me many years of confusion trying to install WordPress locally. All these while, someone would help me with the installation. But now, I’ve done it myself for the first time, after about three years. In fact, you’re the man! I feel like I’m flying over the moon! Thumbs up for the expert! CCChhHeeEEEEErrrrRRRRRRRsssssS!!!!!!!!!!!!!!

  17. David Knowles

    Thanks for the nice and easy tutorial, work perfect first time, like all good tutorials and do not leave having to guest any of the stages, again like a good tutorials.


  18. anwar

    Thanks Harsh , am already using LAMP on my ubuntu system , now just istalled wordpress using WAMP in my windows

  19. Dheeraj Bansal

    Thanks Mr. Harsh .I find this article very helpful.
    Finally after so many efforts I got WordPress Installed on my PC.

  20. great tutorial. i was able to get everything installed with ease.

    how do i get WP to recognize the new Pages I created on the localhost. i’ve published the new Pages via the Pages dashboard, but when I reload the site in a separate browser tab i get an error that the link is broken. Am I missing something?

Leave a Comment

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

Scroll to Top