Blogging How To Software

How to install and customize WordPress offline on localhost?

If you are on the way to start a new blog and you bought the domain and hosting; you are now just left with WordPress installation and setup. I would recommend you to install and customize wordpress offline on your PC before making your site live.

Now the first question would be arising in your mind that why should you install WordPress on your PC on localhost? So this is the main reason for installing the WordPress offline on localhost.

Why should you install WordPress offline on localhost?

#1. Editing and checking result take less time

If you are editing or doing some initial WordPress setup and you want to cross check the result whether the change has occurred or not, then since you are editing and checking it online it may take time due to your internet speed. Page may take longer time to reload. And trust me it really a headache to work on slow internet speed when you want to reload the page again and again frequently.

#2. Best for editing theme

Whether you want to start your blog or else you have your one and want to change the theme then if you change your site theme while your site is live it may make annoy to several users due to sudden changes, since you have just activated another theme in which all your links on homepage, side widgets are to be setup. But using offline WordPress you can edit theme setting according to your requirement in your own pace of time without being in hurry.

#3. Can work offline without any internet connection

If you have installed WordPress on your localhost then you don’t need to wait for your internet connection for doing the setup. Even if your internet is down temporary you can edit the theme or work on dashboard offline without having internet connection.

I think above reasons are enough for your question. So, let have a look over the procedure to install WordPress offline on localhost.

Steps for installing WordPress offline on localhost:

#1. Create a local server on your PC

I know the heading of this step is somewhat techy but don’t worry even if you are non-tech guy you can do this within a couple of minutes.

Just download wamp or xampp and click on the downloaded setup file to install wamp or xampp on your PC.

Note: Install only one server out of the above two.

Once you have installed the wamp or xampp in your PC you can access the localhost from browser by typing ‘localhost’ or ‘’ in address bar. And you can find the server’s files in ‘C:\wamp\www\’.  If everything goes correct you can see this page in your browser as soon as you type’’ in address bar.

Note: Since I have installed wamp server on my PC, here I am showing screenshots from Wamp servers

You can also check steps to install WordPress offline using XAMPP server.

localhost on Wamp Server

#2. Create Database for you blog on localhost

Once you can see the above screen you can find phpmyadmin’ option on this page under Tools heading, just click on this option to go to next step to create database.

Alternatively, you can type in browser’s address as ’localhost/phpmyadmin’ or ‘’ to go to next step to create database. For login id and password, use root as login id and leave password textbox blank. Just hit Go!

Once you have done with above steps you will be redirected to phpmyadmin page as shown below, just enter you database name let’s say ‘STL’ in textbox under ‘Create new database’ option and click on create button to create database. Once the database is created you can check your database name in left side column.


Create Database on localhost

#3. Download and extract WordPress file

Download WordPress setup file from Now make a folder in ‘C:\wamp\www\’ which will refer to yours site let’s say ‘STL’, extract the downloaded files in ‘C:\wamp\www\STL\


STL folder in ‘www’ folder in ‘C:\’


Worpress Zip file extracted in STL

#4. Edit wp-config-sample.php

Now once you have extracted all files in your STL folder you will find a php file in STl folder named as ‘wp-config-sample.php’, just open this file and do the following changes as shown below:




Replace the following:

#a.  ‘database_name_here’ with ‘stl’ which you have made in setp #2.

#b.username_here’ with ‘root’ since it is default username in localhost unless you have added another user.

#c. ‘password_here‘ with ‘ ’  (blank), here password should be empty, again same reason which is mention in #b.

Now Save As ‘wp-config-sample.php’ as ‘wp-config.php’ in ‘c://wamp/www/STL/

#5. WordPress installation

After the above step just go to home page of your localhost again by typing ‘localhost’ or ‘’ in address bar and now here you can see your STL folder as a porject which you have made in  ‘c://wamp/www/’ under project option. Click on this project ‘STL’ to proceed with WordPress installation on localhost.


Newly created Project

Alternatively, you can type ‘localhost/STL’ or ‘’ in browser’s address bar to proceed with WordPress installation on localhost.

Here you will be redirect to WordPress installation page as shown below where you need to provide the basic information about your blog like name, username, password, email, etc. Remember the username and password which you will be entering while installation will be same for WordPress dashboard login.

wordpress installation


Once you are done with filling the information about your blog, click on ‘Install WordPress’ button to install the WordPress on your localhost in your PC. And now you are ready to login in your dashboard.


Successfully installed

Click on login button to login to your blog dashboard which will be working offline without any internet connection.  Now after login you can check every option and you will get access to everything on your dashboard as you have on online dashboard. Now edit everything as per your need and check as many times as you want before uploading the edited file in the root folder of hosting database.

Now if you want to access your blog using localhost, just follow the below steps:

#Launch wamp/xampp server in your PC using start in window 7

#Type ‘localhost/STL’ or ‘’ in browser’s address bar.

Please feel free to drop comment if you have any query about WordPress installation on local server. And share this with your friends if you find this a useful tutorial.

Want to get similar cool tech stuffs in you Inbox? Subscribe to my Feed!


  1. Hi Shivkumar,

    Wow…now this looks like an awesome tool to use, especially when working off line. It is a bit “over my head” but as I carefully read through, I did get a good understanding of what this does.

    I work from my home office, so I’m always plugged in. And when I need to get away, I unplug for my sanity. However, for those on the go, those who may have a job and still want to work on their own business… This is great!

    I can see the many advantages this has! Thank you for introducing me to this and I will share it with my friends.

    donna merrill recently posted…Why Updating Your Blog Is ImportantMy Profile

  2. This is indeed a good guide for those who want to customize their wordpress blog. Its good to customize offline first rather doing direct on live blog. Thanks Shiv.

  3. Hey Shiv bro,

    Very informative post as Donna mentioned she was getting points perfectly but later she managed the same.

    I truly think it is awesome tool for the one for the offline customaization. May you come up with more ideas like that as I am mediocre in all these stuff and hope your information keep me updated.

    Thanks for sharing easy to understand instruction.
    shiwangi shrivastava recently posted…Freelance Writing: Much Ado about NothingMy Profile

    1. Author

      Hi Shiwangi Di,

      I am very happy to see you on my blog, welcome to my blog. 🙂

      It my pleasure to know that my ‘how to’ guide has updated your knowledge with this useful tools.

      As you and everyone here knows that “learning never Ends”, I will keep learning and updating such more useful stuffs which will definitely add up to your knowledge.

      Thank for stopping by Di, hope to see you again. Have a nice weekend 🙂
      Shivkumar recently posted…How to Uncover short link URL safety before you click using URL Uncover?My Profile

    1. Author

      Hello Tim,

      Welcome on blog.

      As you have mention that you have been working on wordpress on localhost since long time. So which local server you were using till now?

      As per you question, you can use any one of the two local sever at which you are comfortable.
      For me wamp server is under my finger tip. So I would always prefer to work which wamp.

      Thanks for stopping by, have a nice day ahead.
      Shivkumar recently posted…How to Uncover short link URL safety before you click using URL Uncover?My Profile

  4. Hi, Nice post buddy. I work from my home office, so I’m always plugged in. And when I need to get away, I unplug for my sanity. However, for those on the go, those who may have a job and still want to work on their own business… This is great! I find your site is well maintain. 🙂

  5. Hi,

    Good to see this post. I am come here by searching “offline local host customize WordPress plugin” via Google. You are addressing the good and worthy information by step by step tutorial. Generally people are prefer to write a lenghy post but I like your way to explain it with help of Image. So audience are easily understand. Thanks


      1. Your very welcome Shiv. As I said this is really good. I personally believe that before you going to live your site you have to make all changes in offline mode instead of live. Because it’s a bit of difficult to work with a live site. 🙂

  6. hi friend, nice post. i’d appreciate your effort in writing this awesome post. i have a question: can this tutorial work on android?

    1. Author

      Hello Emmanuel,

      Welcome to STL,

      Thanks for appreciating my work.

      Actually this offline concept require to make a local server which has to deal with different ports address which we won’t get in Android Tablet or smartphone. So this is not available for android.

      Thanks for coming by and asking your doubt.
      Have a great day bro! 🙂

      >SK Lohar
      Shivkumar recently posted…Earn free recharge for Smartphone using LINE appMy Profile

    1. Author

      Hi Kate,

      Thanks for the complement!

      If you have made changes in database and you are quite sure about the changes then you can directly go on your host server database and do same changes in respectively table otherwise you can export database from localhost to your host server.

      And if you have made changes to file like .php, .css etc then you can replace that single file ( whichever file you have edited on localhost). Other wise you can upload all the files under www>STL(as per my example) on your host server.

      Hope this would help you.

      Thank for stopping by and I appreciate your query. Thank you.

      Have a great day ahead! 🙂

      >SK Lohar
      Shivkumar recently posted…5 Google chrome tricks and shortcuts – PART IMy Profile

  7. Hi… is there any application fitted for Mac OS X? Xampp and wamp are both not supported for Mac…
    Thanks a lot for the help.

  8. Following your instructions I got to the install and then it threw these errors…

    wp_posts: Table ‘spl.wp_posts’ doesn’t exist
    wp_options: Table ‘spl.wp_options’ doesn’t exist
    wp_postmeta: Table ‘spl.wp_postmeta’ doesn’t exist

    How do I correct these so I can move on? I love your instructions, but need a little help.

    1. Author

      Hi Alnahhas,

      Since now you have edited you site offline and ready to published. Here you have two options to go.

      1. Note the modification you have done offline and make same changes by installing fresh theme online.
      2. Uploaded changed file from you computer to your hosting server, don’t forget to import database.

      Hope this will help.

      Thanks for coming by.

      Have a great day ahead! 🙂

      >SK Lohar
      Shivkumar recently posted…Reduce mobile data usage by disabling auto play FACEBOOK videoMy Profile

  9. Is there a way to install a custom theme after following the above steps? When I go into the dashboard and try to install a new theme zip file I get a message that says “Are you sure you want to do this? And has a hyperlink that says “Please try again” Any suggestions?

    1. Author

      Hi Archana,

      Glad to know that it worked perfectly for you.

      Do subscribe my blog for other new useful stuff.

      Thanks for coming by.
      Have a great day ahead! 🙂

      >SK Lohar

  10. i have my offline install up and running but when I upload themes from WordPress the headers do not seem to be uploading as well as the photos from the Theme? Is working offline causing some functionality issues because I am really not online?

    1. Author

      Hi David,

      While uploading theme, there may be issue if you main folder is not containing index.php file or size of theme would be more than uploadable size from dashboard.

      You can just unzip your theme folder in C:\wamp\www\stl\wp-content\themes\
      now just reload your dashboard. Once dashboard is reloaded you can see same theme in installed theme option. Hope this would help.
      Thanks for coming by.
      Have a great day ahead! 🙂

      >SK Lohar
      Shivkumar recently posted…How to transfer files, media from phone to SD card and vice-versa?My Profile

  11. Hello. many thanks for the help. I have followed all steps described but when I get to http://localhost/stl/wordpress/ I only see is the picture of a living room with 2 aloe vera on a table. On the left: My site Just another wordpress site, on the right a cursor facing downwards leading to a search panel. No administration panel or dashboard.
    Any ideas?
    Thank you

  12. I gave up.. i tried like 3 hours and can’t get through 4th point, it says error establishing connection, and when i change hostname from localhost to, i got something like this:
    Parse error: syntax error, unexpected ‘.0’ (T_DNUMBER) in C:\wamp64\www\testowa\wp-config.php on line 32
    Call Stack
    # Time Memory Function Location
    1 0.0008 279856 {main}( ) …\index.php:0
    2 0.0016 350976 require_once( ‘C:\wamp64\www\testowa\wp-admin\admin.php’ ) …\index.php:10
    3 0.0021 371336 require_once( ‘C:\wamp64\www\testowa\wp-load.php’ ) …\admin.php:31

    Could you help me with that please?

  13. Hi Shivkumar, your blog is really helpful and amazing.
    I just have a few questions though; do you have to be online to install wordpress and do you have to have a pre-existing site to be able to set username and password


Post Comment

CommentLuv badge