Installing WordPress Locally On Your PC

by on Tuesday, March 2nd, 2010

  • Share
  • Share

As I write the title of this tutorial, I can tell it might get long and/or complicated… I’ll try my best… here we go.

FIRST, you’ll need the tools — download Virtual PC (especially if you run Windows Vista) and then grab an image here — I would suggest getting the IE6 image, since that version of IE is the “worst” of them all.


Great — now you can run virtual pc (check out my settings below, i give it 1GB of memory):

localWordpress1

my settings for an IE6 image

Now you can download your favorite text editor, Firefox and all the necessary plugins (like Firebug)… and then download XAMPP (XAMPP is like setting up IIS on your machine so you can view server-based code locally (like ASP and .net — WordPress is php)

After installing XAMPP, run it and it’ll look like this:

xampp up and running

xampp up and running

You can make sure you set it up correctly by going to http://localhost/xampp/ — it’ll look like below:

w00t... it's set up!

w00t... it's set up!

Noooowwww… grab a copy of WordPress and unzip it to C:\xampp\htdocs — if you intend on having multiple projects, unzip the files into a unique folder, like so

magi, skimonkey, wordpress, and snuggib are four different projects

magi, skimonkey, wordpress, and snuggib are four different projects

From here, it’s just like setting up WordPress (without having to FTP the files, of course), but with some minor changes

Database setup

Go to http://localhost/xampp/ and click the phpMyAdmin link in the left column

set up the database

set up the database

In the “Create new database” field, type in the name of the database and click the “Create” button

name your database

name your database

Update wp-config.php file

Jump over to C:\xampp\htdocs\folder_name and rename the wp-config-sample.php file to wp-config.php. update the code block below:

/* MySQL settings */
/* You can get this info from your web host */
/* The name of the database for WordPress */
define('DB_NAME', 'putyourdbnamehere');

/* MySQL database username */
define('DB_USER', 'usernamehere');

/* MySQL database password */
define('DB_PASSWORD', 'yourpasswordhere');

1 – define(‘DB_NAME’, ‘putyourdbnamehere’); - rename ‘putyourdbnamehere’ with whatever your database name is

2 – define(‘DB_USER’, ‘usernamehere’); – rename ‘usernamehere’ with ‘root’

3 – define(‘DB_PASSWORD’, ‘yourpasswordhere’); – replace ‘yourpasswordhere’ with ” (2 single quotes)

Install WordPress

Save the file and then head over to http://localhost/folder_name/wp-admin/install.php, where you’ll be greeted with the WordPress setup screen

After typing in your blog name and email address, MAKE NOTE of the username and password it provides for you — otherwise, you’ll have to reset that information in the database (ooh another tutorial idea)

Ta-da! that should do it, you’ll be able to get into the admin through http://localhost/folder_name/wp-admin/ and view the site through http://localhost/folder_name/

Questions or comments?

{ One Comment }

  1. Great post Joey! Now we need to get another one set up for Macs. Pretty much the same process, just using MAMP instead of XAMPP.

Post a Comment





Get notifications of comments via e-mail. You can also subscribe without commenting.

  • Gorirra Consulting Advertise with Matters of Grey
  • Matters of Grey on Facebook