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 for 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.
2) Click Next button to install Xampp.
3) Choose your Install location,by default it will install Xampp in C:xampp
4) Select which service to be installed.Leave Filezilla as it is not required.However you can install it later.
5) You will get Notification as “Service Installation is finished”. Click “ok” to continue.
6) Now your installation is finished,click “Finish” to continue.
7) Now after installation you will able to see XAMPP control Panel from where you can see various Buttons for setting and other purpose.
8) Click Admin button beside Apache in Xampp Control Panel to get started.
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.
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.
11) Now you have created a database and it’s time for connecting database with WordPress. Download WordPress and extract it to C:xampphtdocs using winrar or winzip.
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 .
13 ) Now click “Create a configuration File” to create config.php file
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.
15) After creating Config.php file you will get option of WordPress installation.Run installation by clicking it.
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.
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.
Hey but old version also had this feature.I’m using this method since one year.
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.
Yes it seems that there is some problem in new version of Xampp.But don’t worry.Just go to http://localhost/ and click phpMyadmin to access phpmyadmin and then proceed.
Thank you Ankit, problem solved.
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 ……
Ya, this method is quite simple.
so u mean to say u host dohack in ur computer? :D?
Ya for testing and changing code or even when I’m installing new plugin.Through this i can test new themes in less time.
Done, and Thanks for this very useful post.
+1’d this. :D
I failed at 7th step!!! At phy place admin is not highlighting. Help me
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
Hello tom, I think you have not created password and id for your phpmy admin. So to create it visit http://localhost/security/xamppsecurity.php and then set you id and password.
And now open phpmyadmin using those id and password.Then create a database and edit WP-config file as mentioned above.
Hope this will fix your problem.
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
@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.
Nice tutorial . informative and accurate.
Thanks for compliment. :)
Nice tutorial . informative and accurate.
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
I’m glad that my post helped you.Keep visiting. :)
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
I’m glad that my post helped you.Keep visiting. :)
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
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
wow its really good……… i will try it to use it on my computer…:)