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

42Shares
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 WordPress.com, 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 wordpress.zip. 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 Apachefriends.org

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 www.wordpress.org

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.

LocalWP:

  • 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
42Shares
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. Edhitok

    Its very clear and simple explanation. I have tried and now installed the wordpress on my computer offline. Thank you for your guide.

  2. jenii

    Hmm and i am still having issues with this. Is it possible for you to hit me up on mail. I already wrote you on twitter.

  3. anurag

    i installed WPMU on my WAMP.

    So, how should i mange URL here which are managed by htaccess file ?

    1. Harsh Agrawal

      hey Anurag
      I have not tried WPMU on Wamp.. Let me give it a shot sometime soon and I will come up with answer…

  4. Rik Williams

    Harsh
    Many thanks for a clear and informative Tutorial. As a recent newbie of 3 months and playing with WordPress I realised I had to do a local install to really test before going live with a launch.

    I thought this was going to be a nightmare – not at all. thanks again and as a small compensation I bought a ebook through one of your links. Rik

  5. Designer Mozi

    Before seeing this article it was looking big trouble to install wordpress, but thank god it’s working now! 🙂 Really well written post!

  6. MrsMoody

    I also use Wampserver to install it locally, very useful eespecially when you want to try plug in or create your own template. Thanks for this post!

  7. Rhys

    Great post! I’ve wondered about this, as I do a lot of coding on the move & travelling. Bookmarked & will be implemented 🙂

  8. Vedran

    The problem I have is that I can´t save changes in header.php while working with wordpress localy in wamp. Why is that? Please help me

  9. Phaoloo

    It’s extremely useful and faster to handle the code before uploading. If you want some hacks for theMy SQL, installing Navicat or MySQL Query Browser may ease the work.

  10. jan geronimo

    Great howto on installing WP locally. The nice and big screenshots help a lot, making the step by step process very easy to follow. Well done. 🙂

  11. Annand

    I have setup wamp and I was able to setup a new install of wordpress using wamp. How can I run my online blog (all files + database) on my localhost so I can work on it then upload new changes. I tried importing the database, but I can’t get the contents to load.

    Thanks for your help.

    1. Phung Van Tu

      You can fix by go into Setting in Dashboard, then change WordPress Address and Site URL with your local IP.

  12. vikrant

    hi thanx for ur great tips but i hve one prob i have done everything right according to ur steps but wen i login from wordpress.com it showing my old blog and old themes and post its nt showing my orginal blog which i hve created using localhost/wordpress all the changes i hve made its nt showing on wordpress.com and and when i login from localhost/wordpress it doesnt show me my website address it shows link like this localhost/wordpress only so pls tel wat shuld i do?

    1. Himanshu

      Import your blog to local wordpress.

  13. Chethan

    I haven’t Tested This!
    I used xampplite for local Installation of wordpress..
    and everything was working fine.. but once i installed ISI server in My Comp.. the default localhost(port number 80) was occupied by Microsoft.. so it used to redirect to diff path…
    after searching for help, i got an answer that we are required to configure the port number other than 80 in config file….

    does the same applies to wamp?

    1. Chethan

      Typo, it is IIS Server (not ISI)

    2. Arunkumar Gudelli

      Yes. You need to change port number for apachy server.Go to C:xamppapacheconf and open httpd.conf file and and search for
      Listen 80
      Instead of 80 you can give some other port number like 81,82 etc.

  14. Renjith

    I’ve tried installing wordpress using Xampp, but the problem is that .htaccess don’t seem to work ther… [not only for wordpress, i had this problem for all scripts using htaccess.]
    due to this, custom perma links never works in xampp…
    does htaccess work for WAMP?

  15. Aman

    Really very useful info harsh… will help a lot in initially experimenting on the local machine and then hitting over the net.

  16. Vinay Prashar

    woot that was so well explained, going to try this tonight. I was always looking for something like this to test theme modifications offline.

  17. Avi Singh

    As I am learning WordPress and I have accounts in many free hosting websites like 000webhosting and x10hosting but they are full of errors and some of them disabled my account without any reason.
    I really need this type of Local hosting.
    Thanks harsh

  18. Ruchi

    I am currently using Xampp to create a simulated environment , I will surely give this is a try, looks like a purely user driven without manual intervention which is required in XAmpp.
    Problem I faced with Xampp is that i was not able to run it as windows service, i hope this can run in background as the windows service.
    Thanks for sharing such a nice post.

  19. dr. rajesh moganti

    I one among those people who still feel wordpress as alien platform because I am very afraid of paying penalty in search traffic and other parameters. But i decided to change my blog from blogger to wordpress after seeing this awesome post, please help me in changing to new platforn 🙂

  20. Tejaswini

    It is really great to have a local installation of WordPress, for some new experiments. Whenever I have to do some changes on Internet Techies, I usually do it on my local copy and then load the entire changes to production.
    This step by step guide is very useful for new serious bloggers, you making out a good collection.

    1. taranfx

      I have adopted same methodology for years now. WAMP on my local to play around with customizations. Saves a lot of effort.

    2. Zahir

      I am not able to install word press , please guide me,I followed your guidelines but i have a doubt on below given method.
      2. Now extract the WordPress.zip. Create a folder under C:\wamp\www name it as WordPress copy all the files and folders under WordPress folder in C:\wamp\www

      I am not able to copy the .zip extracted files and paste in wordpress folder.

      Kindly help me step by step to install wordpress , i am using windows 7 ultimate.

Leave a Comment

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

Scroll to Top
42 Shares