How to Install WordPress Locally on your Computer

WordPress is definitely is the best CMS for blogging as it is Famous for ” 5-Minute Install “and easy to use. As a webmaster or Blogger you need to test new themes and plugin regularly, but it may go wrong sometime and your site may get down.  So to avoid it , you can test your themes and plugin Locally in your PC without any fear and much faster speed.

To install WordPress,it has following requirements (Version 3.2)

  • PHP version 5.2.4 or greater
  • MySQL version 5.0.15 or greater
  • (Optional (required for multi-site)) Apache mod_rewrite module (for clean URLs known as Permalinks)

It is difficult to install an Apache web server on your computer and it gets harder if you want to add MySQL, PHP and Perl, though forXampp WordPress you only need PHP and MySQL . I’m using XAMP for installation of PHP and MySQL in my computer and then WordPress.

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. It is really very easy to install and to use – just download, extract and start.

Steps To Install WordPress Locally on your Computer.

1)  Download Window installer of XAMPP from here and install it according to instruction.

 

Xaamp windows installer

 

2) Click Next button to install Xampp.

 

xamp installtion

 

3) Choose your Install location,by default it will install Xampp in C:\xampp

 

xaamp installtion setteing

 

4) Select which service to be installed.Leave Filezilla as it is not required.However you can install it later.

 

Xaamp installation finish

 

5) You will get Notification as “Service Installation is finished”. Click “ok” to continue.

 

Xamp installation finish

 

 

6) Now your installation is finished,click “Finish” to continue.

 

Xaamp control Panel

 

7) Now after installation you will able to see XAMPP control Panel from where you can see various Buttons for setting and other purpose.

 

 

Xaamp for Windows

8) Click Admin button beside Apache in Xampp Control Panel to get started.

Xaamp service status

9) Then click “Status” present in menu bar, to know which component is running or not. Change your password for Apache and Mysql by typing this URL in your browser  http://localhost/security/xamppsecurity.php .You can also check your local server security here http://localhost/security/index.php and then do as required.

Php My admin logo

10) Now its time to create a Data base in PhpMyAdmin. To create database open Xampp Control Panel from Notification area. Click “admin” beside MySQL (See picture under 6th point). Login with your username and password, which you have just created. Enter wordpress or any other name in Create new database and click create.

Create database in php my admin

11) Now you have created a database  and it’s time for connecting database with WordPress. Download WordPress and extract it to C:\xampp\htdocs using winrar or winzip.

Wordpress installtion directory

12) Now you have two option for installing WordPress. First by editing sample-config.php file manually  and other directly via WordPress. I’m showing second method to install WordPress.

Open any browser and  go to this URL http://localhost/wordpress.You will get this Configuration error .

Wordpress config error

13 ) Now click “Create a configuration File” to create config.php file

Wordpress config.php file data

14) Enter all details like database name,username and password, same as created in MyPhpAdmin. Leave database Host and Table Prefix as Default.Then click submit to create Config.php file.

Wordpress installtion

15) After creating Config.php file you will get option of WordPress installation.Run installation by clicking it.

Enter WordPress site details

16)  Enter your site details and passwords for full installation and click “Install WordPress”.

This your last step and now you can sign in WordPress and test your theme and plugin locally. For accessing  your admin panel go to this URL http://localhost/wordpress/wp-login.php and to access homepage go to this URL http://localhost/wordpress/.

Please share this post if you liked it .Ask any question if you have any doubt.Comment will be appreciated.

Published by

Ankit Kumar

is an Electronics Engineer and young blogger from Mumbai, India. He is electronics hobbyist who loves blogging. Subscribe for the email newsletter for your weekly dose of technology news.

25 thoughts on “How to Install WordPress Locally on your Computer”

  1. Very good tutorial with alot of screenshots illustrated. I regularly follow edting the wp-config-sample and renaming it, never knew the newer version came up with options to enter them directly.

  2. Hi Ankit very good article. I am following this, but at 10th step when i am Clicking “admin” beside MySQL it is not displaying any window like this article. what to do. waiting for your reply.

  3. i have already installed wp on loacal host
    i just create datatbase then copy my contents to htdoc & finall use username as root….
    i will also try u r method next time ……

    1. Ya for testing and changing code or even when I’m installing new plugin.Through this i can test new themes in less time.

  4. Well I got mostly through the tutorial.. but once I got to step 10 I’m dead in the water.

    Seems I don’t know the correct login or password.  I tried root and pma and my own name as the login and various different passwords that seemed obvious.. but no combination worked.

    If I put in my name and no password I get to a phpMyAdmin screen and then when I click on Databases it tells me Create New Database – No Privilege .

    If I put in my name and the password I created in an earlier step I get a pink bar that reads: “can not log into the MySQL server”

    Any help or suggestions would be greatly appreciated.

    By the way, I have searched google high and low to find out how to create privileges.. but no luck

    Thanks

    Tom

      1. Nope Ankit, that does not seem to be the solution either.  

        When I went into 
        http://localhost/security/xamppsecurity.php it shows me as the user ROOT… which I can not seem to change.  I gave it a password as requested and also assigned a username and password to XAMPP as that window appears to ask for/allow that as well.  

        By the way, when I look at the STATUS (screen 9 above) it shows the MySQLdatabase as ACTIVATED as opposed to your example where it shows it as DEACTIVATED.  

        When I try to login to phpMyAdmin I use the username of ROOT and my password and I get a pink box that says “Cannot log in to the MySQL server.  

        I am suspecting that the problem may be the fact that the server is ACTIVATED… but I don’t see the option to deactivate it.  

        I’ll keep looking.. but am hoping that you will come back to me with some more guidance/instructions.  

        Thanks.
        Tom

      2.  @5bc5e087df7eef0b98fbaf372d277358:disqus I would suggest you to uninstall Xampp and then reinstall and proceed step by step as above written. It will work then sure.And this time keep username as root only for phpmyadmin and then edit wp-config file accordingly.

  5. Voila !!  I think I’ve got it.

    Your tutorial was most helpful.  I did a few things wrong, but that was because I was not doing EXACTLY as the tutorial said.  My bad for not following step by step.

    Thanks Again !!

    Tom

  6. Voila !!  I think I’ve got it.

    Your tutorial was most helpful.  I did a few things wrong, but that was because I was not doing EXACTLY as the tutorial said.  My bad for not following step by step.

    Thanks Again !!

    Tom

  7. As a newbie, your detail post was very helpful and was able to install WordPress locally as assume domain. I have a question, If i need to add another domain or want to change name of domain, how can i do it??

    Thanks again and keep up great work.
    MZ

  8. As a newbie, your detail post was very helpful and was able to install WordPress locally as assume domain. I have a question, If i need to add another domain or want to change name of domain, how can i do it??

    Thanks again and keep up great work.
    MZ

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>