Today I have a new tutorial on How to install WordPress locally or on LocalHost. But first question why would I want to install WordPress locally or on local machine ?
Well the answer is not good for all, I mean if you are a simple blogger who just want to login and write a good post then this is not valuable for you. But if you are a good blogger, who is also interested in new themes and WordPress plugins, or you are a developer who wants to create own wordpress themes and WordPress plugins then this is a right thing.
So those who don’t know much about, this can be a WordPress Tutorials for Beginners for them.
But now you will say that you can do these things on WordPress.com as well.But you can’t, as on wordpress you don’t have the permission to install custom premium themes and plugins.
You can also use the Free hosting sites to use the WordPress for testing, but that would require your bandwidth and the data as well. But more importantly that it would be very slow. That’s why it would be appropriate to use wordpress on your own localhost or your local machine.
If somebody ask me that why I use WordPress on my localhost then my answer would be :
When I got a new theme, I first checked it on my localhost WordPress because now these days WordPress themes have a complex procedure of installing and customizing. They all have the drag and drop feature but due to that we have to create our own custom home page and blog page which takes a lot of time. And if that theme is already active on our site then the viewer will leave it immediately as he approached. For that we put our website in maintenance mode but that in return will also lose the viewer as well. So installing and customizing the theme first in my computer gave me an idea on how the theme will work or how I will create custom pages with its drag and drop feature. In the mean time my website runs clearly without any bug.
It helps me to check whether I should use a plugin or not. In my early days I installed a security plugin on my blog (I don’t remember its name now). It has an ability to hide the login page of the wordpress so I activated it. But with the login page it also hide the complete wordpress blog as well. First I thought the servers are down but after a day the blog still didn’t open. Then I thought this may be due to the plugin which I recently installed. But what now I can’t open wordpress admin board, then how should I deactivate it ? Then I use the FTP client to access my space on the hosting. And from there I removed the plugin which back my wordpress blog back. So now before installing any new wordpress plugin I first checked it in my local wordpress installation.
When I need to make some changes to my theme I can do that by using the child theme of the current theme. Now to do that I don’t want that my visitors see some alteration in the site. So, the locally installed wordpress helped me in that. And since all the files are on the local host so it takes an instant to reload the page and see the changes.
This is a must thing for a developer who is developing WordPress Themes, WordPress plugins or something like that. He can’ t take that much time to test his creation or uploading it again and again to check. He should also have the knowledge on working of the WordPress so he can only gain this type of knowledge when he has the WordPress in his own computer.
[themify_quote]We are using FOOBOX plugin so to see the image clearly, click on them[/themify_quote]
How to install WordPress locally or on localhost ?
There are two method for doing that, if you want an easy one then that is the first method. But I won’t recommend it ,why ? Well the answer is at the end of the steps of method 1. But in this method all you have to do is next and next nothing else.
The second method is a little bit complex, but don’t worry I am here to guide you 🙂 . In this you have to do everything manually like creating database, choosing the database for wordpress and some more things.
How to install WordPress locally or on localhost by Easy Method :
As you know that the wordpress is based on php which is a server side language. That means it needs a server to run, for that we have to make our local computer a local server. There are many softwares for doing that like WAMP(For Windows Only), XAMPP(For Windows, Mac and Linux), and MAMP (For MAC only).
But here I am using XAMPP, you can use any of the one you want, the method is likely the same for all. So this would install WordPress on Windows but for MAC the procedure would be the same.
Download XAMPP from this link, just choose your operating system, download and install the software. Most likely you will install it in C drive, so in C there will be a folder named as XAMPP.
Now open XAMPP control panel and start the Apache and MySql module.
Then all you need to do is to install the Bitnami package for wordpress, at the installing time it will ask for site name, username and password just provide it that and you are done.
It is very easy to install but as I tell on the above line I do not recommend this.
The reason why I am not recommending this is :
- I don’t know this happens with me or with everyone else, But I faced some peculiar problem while using this. For example I have to install every theme from the wordpress dashboard. If I just place the theme into the theme folder, The wordpress would not detect that. Also that time I was working on child themes, and because of this I got very much trouble.
- The second thing which I face is the loading of pages take some time while all the files are present inside you own computer. Again I don’t know if this happens to everyone or not. So that’s why I won’t recommend you to use this.
How to install WordPress locally or on localhost by manual method :
1. The first thing is same you have to download and install the XAMPP Server.
2. Now download the wordpress package from WordPress.org, (means the whole WordPress Download part) extract the package and paste it in the “htdocs” folder which is situated in XAMPP directory.
3. Now open XAMPP control panel and start the Apache and MySql module.
4. Open your browser and type “localhost” or “127.0.0.1” without quotes. You will see a page like the below image. You have to select “phpMyAdmin” from the left sidebar.
5. From there select database from the upper menu.
6. Now in the database name enter “wordpress” and then press create.
7. The database thing is done, now we have to setup the wordpress. In your address bar type “localhost/wordpress” or “127.0.0.1/wordpress” and you will see the following screen. On that click on the “Create Configuration file” button.
8. Now fill out some basic info here :
- In the database field write “wordpress” as the database.
- In the username write “root” as this is the default username in XAMPP
- Leave the password field blank and other things the same as they are.
9. Then in the next step fill all the required field, you can enter anything you want.
10. That’s it the wordpress is now installed in your computer or as we can say you have a Localhost WordPress.
11. To access your dashboard write “localhost/wordpress/wp-login.php” or “127.0.0.1/wordpress/wp-login.php” in the address bar. And to view the wordpress site enter “localhost/wordpress” or “127.0.0.1/wordpress” in the address bar and hit enter.