How To Install WordPress on Localhost ?

Today I am going to tell you how to install WordPress on your local machine or local server. There are several steps that are required to install the WordPress successfully on the Localhost. So just simply follow these steps :

a. This step requires you to download the WordPress software. Visit to download your copy of  WordPress.

Download WordPress

b. After downloading the software , simply extract in the root directory of the server. ( www directory in case of wamp and htdocs in case of xampp/lampp). Place the contents in a folder named as WordPress.

c. Now start the local server(xamp or wamp) and in the browser screen point to the following URL : http://localhost/wordpress/

Local Server

d. You will be faced with an error message regarding the configuration file.

Wordpress Error

To rectify this error there are two ways.

  1. Either you go manually and rename the wp-config-sample.php file to wp-config.php and then manually enter your database details
  2. Else you can go by the graphical user mode. This mode is a preferred one

e. We will proceed via the GUI Mode. First of all we will create a database using the PHPMyAdmin so that all the sample data of the WordPress is installed in it.

Open the PHPMyAdmin using the URL    http://localhost/phpmyadmin


Then click the Let’s Go button on the Web GUI to initiate the installation of the WordPress on the localhost.


Now understand what have to be filled here in the text fields.

Database Name : It is the name of database where the sample data of the WordPress will be installed. Since we already made a database using PHPMyAdmin named as WordPress , type in this name

User Name : This specifies the user who will use the database. Since the installation is done on local machine we will designate our user as root.

Password : This will authenticate the user to access the database. This is left as blank in this case.

Database Host : It is the host computer on which the database resides. Since for local installations the host designated is localhost.

Table Prefix : It is used when we want to run multiple installation on the same database. Leave it as default which is provided in the text field.

f. Finally click on the Submit button. And if everything goes right you will be faced with the following screen:

Run Installation

The above window shows that wp-config.php has not been written. To rectify this error just go to your web directory and copy paste the matter written in text box into a new file named as  wp-config.php. After that just hit Run The Install button.

g. If everything goes according to the plan, you will be faced with famous five minute WordPress installation process. Just enter the personal details and password.

Final Installation

Finally click Install WordPress.

h. Now login to your website’s admin panel at http://localhost/wordpress/wp-admin to customize its looks and settings.

Wp Admin

i.     To have a first look of your new setup wordpress site simply enter this URL : http://localhost/wordpress/


Congratulations!!! you have successfully installed the WordPress on the local computer

Article by

Akshay is a Tech Enthusiast who loves to write about Technology and Gadgets. He is very passionate about blogging and has been blogging since 2009. You can follow him on twitter @akshayable.

Comments (24)

  1. […] This post was mentioned on Twitter by alexleo, alexleo, srikar acharyulu, srikar acharyulu, Sadashiv Ashish and others. Sadashiv Ashish said: RT @Screamable: How To Install WordPress on Localhost ? via @screamable #wordpress #localhost […]

  2. Swamykant says:

    Excellent Tutorial 🙂

  3. Server how we going to have server on PC???? 🙁 😛

  4. ashish says:

    Thnx a ton I was looking to install wordpres on wamp finaly can do it..

  5. roy says:

    I am using XAMMP for local hosting and trying like heck to add wordpress. I am getting to the point of giving up.
    Everything is done per all of these installation instructions but either I am missing something or just not meant to have it work. XAMMP is working, my user name and passwords are showing in My SQL, in my new database floridadude_wordpress in the php admin (comes with xammp) It says all user names and passwords are granted. So why won’t wordpress load? I even downloaded it 3 times. Yes the info is in the sample file and correct. I get this error message from the install with wordpress that it says my username and password are correct but it can not acess floridadude_wordpress. That is BS because my username and password is there. What am I doing wrong? Nobody will help and nobody seems to have any answers. I just simply want local host desktop usage. Nothing else to paly with wordpress and learn it.
    exact message.

    We were able to connect to the database server (which means your username and password is okay) but not able to select the floridadude_wordpress database.
    •Are you sure it exists?
    •Does the user floridadude have permission to use the floridadude_wordpress database?
    •On some systems the name of your database is prefixed with your username, so it would be like username_floridadude_wordpress. Could that be the problem?
    Yes it exists yes it has permissions, yes I have it username. Bunch of stupid questions with no help. They need to be more specific and I could find nothing in the helps with wordpress either

    If you don’t know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

  6. a.alraji says:

    Thanks a lot. I’ve tried so many times to install it in a fair way. Your tutorial helps me much. I’m wondering that wordpress tutorial has failed to make the installation process easier with phpmyadmin. Thanks again.

  7. Movies says:

    I am new in blogging and learn installing blog in localhost.

    Thanks for sharing with us

  8. TOshu nigam says:

    thanks for this tutorial

  9. dhaval says:

    nice information…thank you very much…

  10. saurabh says:

    i can undertand your information then i am run wordpress in my localhost
    thank you

  11. Mandar Deshpande says:

    OHH.wohh.. cool Its done.. Thanks bro… you actually simplified the whole difficult task.. Great help.

  12. Tom Murphy says:

    Far too easy… LOL

    Thanks very much, an extremely helpful tutorial.


  13. Kamran says:

    Thank you so much. I was missing ROOT:) now everything it Okay:)

  14. Galsam says:

    Thanks for the steps…. was facing trouble until i read ur post!!

  15. Antonio says:

    thank you so much!! Got mine installed in 5 mins.!! 🙂

  16. Ashish Singh says:

    Thanks Akshay. I got my first running on my Wamp. Now my next step would be to edit a WordPress theme. Its all new and exciting for me since basically I am new to php and html. Have a grt day.

Leave a Reply

If you want a picture to show with your comment, go get a Gravatar.