• Home
  • Directory
  • Geeky Fun
  • Answers
  • MakeUseOf Guides
cool websites
RSS Twitter Facebook
Subscribe to MakeUseOf. Now, 168728 members!
Aweber

How To Install A Wordpress Blog Locally On Your Computer

By Dean Sherwin on Oct. 25th, 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 MakeUseOf 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 like the one about improving your Blogger blog. 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 MUO 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 how to install Wordpress locally. 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.

LocalHost - XAMPP SC

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.

localhost - browser homepage

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.

localhost - create database

In the center 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:

localhost - file structure

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.

stumble it!

(By) Dean Sherwin owns a blog about saving money with cool hacks and everyday tips called Art of Stinginess He is available for contact via dean@makeuseof.com.

Enjoyed the article? Subscribe to MakeUseOf to get daily updates on new cool websites and programs in your email for free. You'll also get free printable cheat sheets to your favorite programs

Your Email:




More about: blogging . blogging tips . local server . self-hosted . wordpress

19 Comments

2009-10-25 20:09:11
john

very nice post, this one is really helpful to start something more interesting

Reply to this comment
2009-10-25 23:53:29
Windows Boy

The easiest way is to use Microsoft’s Web Platform Installer. It’s free!
http://www.microsoft.com/web/downloads/platform.aspx

Reply to this comment
2009-10-25 23:57:31
Gary

Thanks, worked 1st time!

Any chance to see a similar post on how to install Movable Type on a local host.

Always interesting, keep up the good work!

Reply to this comment
2009-10-26 11:17:49
Dean Sherwin

I’ll look into it and if I can I’ll definitely do a post about that within the next week or two. ;)

-Dean

Reply to this comment
2009-10-26 11:34:53
Beau Smith

Here’s how to install Movable Type on localhost on a Mac:

http://www.beausmith.com/mt/2009/05/install-movable-type-on-a-mac.php

Reply to this comment
2009-10-26 00:41:15
dogbait

Brilliant post. Just when I was using a freebie hosting site for testing and this pops up. Many thanks.

Reply to this comment
2009-10-26 08:33:41
Paul Sanduleac

Many people really need this post. Good Job!!!

Reply to this comment
2009-10-26 11:16:26
Dean Sherwin

Hey guys,
Glad you all liked the post! There’ll definitely be a couple of follow up posts!

-Dean

Reply to this comment
2009-10-26 13:03:38
Daniel H
Subscribed to comments via email

I’ve expanded on this topic with tips on setting up your local computer for Wordpress development: Five Steps for Wordpress Preparation.

Reply to this comment
2009-10-29 02:38:56
Raj
Subscribed to comments via email

Could anyone suggest a tool to test/customize blogspot/blogger blog themes locally installing my computer without logging into blogger.com?

Reply to this comment
2009-11-12 07:47:37
marcus

Thanks for the useful info. Once you’ve developed the wordpress site locally what is the process for transferring it to your web server?

Reply to this comment
2009-11-19 12:04:10
Cordless Drill

Hey Marcus, I would like to know the answer to that question myself. If you get any (usable) responses could you please forward it to me as well. Thanks

Reply to this comment
2009-11-19 11:39:42
Cordless Drill

This is exactly what I was searching for, now it’s time to load it and get working. “Thanks a Bunch”

Reply to this comment
2009-11-23 20:01:03
Blog Help
Subscribed to comments via email

Great post! Keep it up. Thank you.

Reply to this comment
2009-11-25 01:50:18
Outsourcing

I was just thinking about How To Install A Wordpress Blog Locally On Your Computer and you have really helped out. Thanks!

Reply to this comment
2009-12-18 00:49:36
Wayne

Hey, nice post. :) Thanks for the interesting info.

Reply to this comment
2009-12-23 22:08:30
Mare

Great post, this one is really helpful, This is exactly what I was seeking for, now it’s time to share it with someone and get working. Thanks a Bunch.

Reply to this comment
2009-12-29 21:56:25
Jake

Great tutorial, Thanks!

I would have taken hours to figure out what only took minutes after reading your post. I really appreciate it!

Reply to this comment
2010-02-01 20:21:16
Install Software

Hi there.
Great installation help…thanks, fixed my problem.
Anyone reading this guys stuff should bookmark it.

Reply to this comment
Reply
Note: Comments with abusive content, sarcastic grammar nitpicking, self-promotion will not be published. All comments are moderated.
Click here to cancel "reply".

TopicsMUO Guides
  • Browsing
  • Cool Software
  • Web Apps
  • Lists of Tools
  • How-To Tips
  • Windows
  • Mac
  • Linux
  • Gaming
  • Mobile Apps
  • Polls
  • Geeky Fun
  • BitTorrentThe Easy Guide
  • iPhoneUnofficial Manual
  • ItunesThe Big Book
  • LinuxGetting Started
  • MacBeginner's Guide
  • MoviesFor Movie Addicts
  • PC BuildingThe Idiot's Guide
  • ProductivityProductivity Guide
  • PhotoshopThe Idiot's Guide
  • TwitterBest Tips & Tricks
  • More Guides
Follow us on Twitter
Be Our Friend on Facebook
MakeUseOf Staff
Editors:
  • Editor in ChiefAibek Esengulov
  • MakeUseOf Directory's EditorKaly
  • Managing EditorMark O'Neill
  • Assistant EditorJackson Chung
  • MUO WP GuyJorge Sierra
  • PDF ManualsSimon Slangen
  • Promotion & SEORyan Dube
  • Sys AdminKarl Gechlik
  • MakeUseOf NewsletterSaikat Basu
  • MakeUseOf Answers EditorTina Sieber
Staff Authors:
  • ( Ask The Admin )Karl Gechlik
  • Tina Sieber
  • ( Tech Crazy )Varun Kashyap
  • ( The Things I Do )Saikat Basu
  • ( simonslangen.com )Simon Slangen
  • ( Free Writing Center )Ryan Dube
  • ( Super Subconscious)Jeffry Thurana
  • ( Tapping Thought )Dean Sherwin
  • ( Mac Photography Tips )Bakari Chavanu
  • ( timmyjohnboy.com )Tim Lenahan
  • ( Boulder Community Computers )Justin Pot
  • Other Active Authors ...

 

© 2010 MakeUseOf . Designed by kailoon AboutContactSubmit AppWrite For UsArchivesMobile VersionDisclaimer visitor stats