This is the first chapter of the WordPress Theme Guide series. In this chapter, you will learn how to install WordPress on a local computer. An essential for any aspiring theme developer is a local install of WordPress. There are plenty of benefits to doing so and there are also pitfalls if you don’t. I will tell you about the pitfalls in a second, but before that, I want to tell you 5 great reasons why you should use a local install as your sandbox as opposed to installing a live version on some subdomain of yours:

  1. Works exactly like the real deal; plugins and all

  2. No need to mess with FTP programs

  3. Develop anywhere (no connection needed)

  4. Make sure your theme is compatible with latest version of WordPress

  5. Code in secret, then release with a bang

Quick Summary

If you have some technical background, you can skip the detailed steps in this tutorial. Here are the simplified steps on how to install WordPress on a local computer:

  1. Install a local server (Mac: MAMP, PC:XAMPP or WAMP).

  2. Create a new database.

  3. Download WordPress from wordpress.org and extract the files to a new folder under the htdocs folder.

  4. Rename the wp-config-sample.php file to wp-config.php and update the database details according to your local server.

  5. Run wp-admin/install.php and follow the instructions to install WordPress.

  6. Done!

Let’s Begin!

Before you start, let’s look at the requirements to run WordPress:

  • PHP 4.3+
  • MySQL 4+ Database Server

1. Install a Local Server

local servers

In order to run any PHP/database application on a local computer, you need a local host (ie. Apache + MySQL). For Mac, use MAMP. For PC, use XAMPP or WAMP.

I’m using PC here, so I’m going to install XAMPP. Go to xampp.info, download and install XAMPP.

2. Create a New Database

After you’ve installed XAMPP, run it and, in your browser of choice, navigate to http://localhost/xampp/splash.php. Click on your language. On the left hand side, under Tools, click phpMyAdmin. On that page, you will see the MySQL heading, like in the screenshot below:

phpMyAdmin

Call the database wordpress and select utf8_unicode_ci from the drop down menu. Click Create

3. Download WordPress

Go to wordpress.org and download the latest build of WordPress. Go to the htdocs folder (where you installed the MAMP), extract the wordpress.zip to a new folder (eg. mysite).

Extract WordPress Zip

4. Update wp-config.php File

In the folder, rename the wp-config-sample.php to wp-config.php. Open wp-config.php and update the database details (db_name, user, password, host) according to your local server.

Update wp-config.php

5. Run install.php

With your browser, go to http://localhost/mysite/wp-admin/install.php and follow the instructions to install WordPress.

Install WordPress

What’s Next?

In the next chapter, I’m going to show you how to create a custom WordPress theme in designer way (no PHP skill is required).

4 Responses to “Installing WordPress Locally”

  1. Ethel says:

    Hi,
    The WordPress Jeans Theme made me really laugh, it’s cool and clever.
    Please send me an email, when you are ready with the 2nd part of WordPress locally, I started doing this 3 days ago, but I’m still quite clumsy with the Templates, I’m grateful to follow you on the shortcut……
    Keep on rocking!
    Ethel

  2. Norik says:

    just a reference for noobies: in case the whole she bang is hard to install locally try http://www.microsoft.com/web/gallery/WordPress.aspx

  3. [...] Chapter 1: Installing WordPress Locally [...]

  4. thank you for this information, can you tell me how do you update wordpress?

Leave a Reply

Hello :)

You are blocking my beautiful
adverts with AdBlocker!
Disable it for CodEasily.com
if you want to see more articles
and leave comments here.

Thanks!