Host a WordPress Blog On Your Own Computer Locally
By: Karan Goel | 26th October 2009
Oh readers, if only you could see me now. You’d be looking at a guy with three day stubble on his face, a pile of junk food in his stomach and a half-finished WordPress website sitting on his hard drive starting a daunting article for KaranGoel that he has avoided for several hours. You’d be looking at a guy who managed to set up a local host on his PC, uploaded WordPress to it and developed a site as though it was live on the internet.
I’ve been doing quite a few posts about blogging lately but this one take a step outside the amateur ‘how-to’s I’ve done. This article is inspired by the website I’m building that’s due to be launched in a month or so – and it’s not for tech newbies, this guide.
Many of us have personal blogs or blogs that make us a second income. And we don’t want to go upsetting our readers by coding and developing them on the Internet. Imagine if every time you visited KG there were design changes, buggy issues or features constantly being moved about and deleted!
So developing your WordPress blog offline is the best option because you don’t interrupt readership (assuming the blog is online already and you’re simply updating), you don’t have to upload pictures and media and you can view your blog easily without it being live on the internet for everyone to see you shoddy design work. The easiest way to do this is to learn how to set up a blog offline. This is done by creating a host on your PC which acts like a host on the Internet such as GoDaddy.
First of all, to set up a blog offline you have to download some PHP Hosting software. There are several well-known options but I’ve gone for XAMPP because I found I had the least hassle with it. You can download it here from SourceForge. Once you have downloaded and installed it like you would any other piece of software, open it up from the ‘All Programs’ menu. The window shown below will appear.

Beside Apache and MySQL, select ‘Start’ so that they are both running like in the screenshot. Now, your local host is up and running and is available to be prepared to accept WordPress. First however, we must make a database for WordPress to be saved in on the host.

To do this open your browser and enter ‘http://localhost/’ into the address bar. This will bring you to the screen shown above. From the menu bar on the left, select phpMyAdmin as illustrated.

In the centre of the screen is the section where you create a new data base. Name your server and select collation from the dropdown menu if it’s not already selected. In the second dropdown menu select ‘uft8_unicode_ci’. I cannot emphasise how crucial it is that you do not overlook this. It is not selected as default so ensure you have it selected. It’s the last one in the list. Without it, the host won’t communicate with WordPress and you’re in a world of problems my friends – if you can’t tell I’m talking from experience. I spend an hour yesterday trying to figure out what the problem was!
Once your server is created you’re ready to embark on the world-famous ‘Wordpress five minute install’ and finally set up your blog. Download WordPress from here. When you have the .zip file, extract its contents to this location:
C:\xampp \htdocs
Your final folder structure should look like this:
![]()
If it doesn’t, open the XAMPP program file and drag the extracted WordPress file into it manually. It must be in there in order for your newly created database to detect it. Then, edit this file using Notepad:
C:\xampplite\htdocs\wordpress\wp-config-sample.php
Scroll down to the part where it asks for database name, username, password etc.. Fill in the details below:
DBNAME: *whatever name you gave to your database*
DBUSER: root
Password: ‘ ’ (This should just be left as two opposing apostrophes)
Then, save the file as wp-config.php instead of the original wp-config-sample.php.
Now, open your browser and enter in the following URL:
http://localhost/wordpress/wp-admin/install.php
This will take you into the WordPress installation just like you were online. Remember, when you’re returning to your PC to do more coding ensure you have Apache and MySQL turned on – otherwise http://localhost/ won’t exist!
Oh and now a health warning: Coding and toying with WordPress is addictive. Prolonged exposure may cause excessive caffeine consumption, personal hygiene and grooming to go out the window, social commitments to follow and a truly awesome WordPress site ready to go live.
November 16th, 2009 at 1:09 am
Thanx for nice article. But I had trouble navigating around your website as I kept getting 502 bad gateway error. Just thought to let you know.
November 17th, 2009 at 1:52 am
As a Newbie, I am always searching online for articles that can help me. You blog reAlly helped me and I will be back soon. Thank you
November 21st, 2009 at 12:34 pm
I every time rea blogs in comparable topic, but I not in the leas visited your blog. bookmarked and i’ll be your faithful reader. Thanks
November 21st, 2009 at 4:23 pm
[...]www.gizmoko.com is other useful source of information. Yeah Imagine getting paid for giving your opinion ! [...]
November 22nd, 2009 at 3:12 am
I love reading through your blog, I wanted to leave a little comment to support you and wish you a good continuation, or when I read your lines I found your article very interested, thank you for sharing.
November 23rd, 2009 at 8:52 pm
There is obviously a lot to know about this, which I did not know. I think you made some good points and I have bookmarked this page.
December 19th, 2009 at 3:33 am
i’m gonna make my own post about it
December 22nd, 2009 at 12:08 am
Epic! I found this place on Yahoo poking around for something else entirely, and now I’m going to have to go back and read through the old posts! Good bye my free time this morning, but this was a truly great find.
January 10th, 2010 at 4:47 am
Hey sweet site there. keep it going.I honestly love to read your blog.Last of all have nice day