Tutorial: Installing WordPress

Getting Started

Okay, easy start. You want to get WordPress up and running? Well first off you’ll need either a hosting account or a local web server. For the latter I recommend Xampp. Once it’s installed you will have access to both MySQL (the database) and PHP. Note, WordPress will run on both PHP 4 and 5. So next step, download WordPress. Once you’ve downloaded it, extract it to a directory and remember where you put it (you laugh but plenty of people forget!).

Set up the Database

If you’re using online hosting you’ll need to refer to your own control panel as to how to do this, however for cPanel users you can go to the MySQL Databases page, create a database, create a user, and assign the user to the database with either all privileges or, for added security you’ll need to give the user privileges for SELECT, UPDATE, INSERT, DELETE, CREATE and ALTER (you also may potentially need DROP if you are going to add a remove plugins that need to create their own tables). Keep a note of the username, password and database as you’ll need them in the next step.

If you’re using a local webserver such as Xampp then you’ll need to ensure you have the security set up for MySQL which will give you the username and password you’ll need in the next step. Then go into phpMyAdmin and simply create a new database, calling it something such as ‘wordpress’.

Configuration File

Back to the WordPress directory created from the ZIP download file you extracted. Open the directory and find the file called wp-config-sample.php. Rename this to wp-config.php and then open it in notepad or a text editor (I recommend and use HTML Kit). At the top you’ll see:

// ** MySQL settings ** //
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'username'); // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

Change the DB_NAME value (currently ‘wordpress’) to the name of the database you created. Ensure the name is enclosed with single quotes. Change the value of DB_USER to the username you chose, and the same for the DB_PASSWORD value. You shouldn’t have to change the value of DB_HOST and most of the time this will be localhost, however if you’re not certain you will need to check with your hosting company.

Since WordPress 2.5 there has been another line to edit

// Change SECRET_KEY to a unique phrase. You won't have to remember it later,
// so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/
// to get a secret key generated for you, or just make something up.
define('SECRET_KEY', 'random phrase'); // Change this to a unique phrase.

Change the words random phrase to a random phrase known only to you. It doesn’t matter whether it makes sense or not, this is used to help encrypt the passwords so needs to be obscure and kept the same at all times, else you’ll lose access to the admin section of your site.

Once these changes have been made, save the file and close it.

Upload and Install

If you’re working on a local web server, simply copy the wordpress directory over to the correct directory to store the web pages in. For Xampp this can be found under c:\xampp\htdocs\ or c:\Program Files\xampp\htdocs. Keep the files within the WordPress directory.

If you’re working online you will need to use an FTP program to upload your files (I recommend and use SmartFTP). You will need to ensure every file is uploaded, maintaining the directory structure.

Once your files are in place you need to go to the address that your WordPress files reside. The root of the directory ie. index.php. If you’re working locally then this should be http://localhost/wordpress/. If you’re working online it will either be just the domain or http://www.domain.com/wordpress/ for example.

When you find the correct page you should get a notice saying that WordPress isn’t installed yet and will supply a link to the install page. Click on this link and you should then get the install page showing. Click to proceed to Step 2 where it will request a title for your WordPress site, your email address and also whether you want to alert various blog search sites such as Technorati after posting. I would recommend to keep this ticked, you can easily turn it off within the admin panel later. Once all the fields have been completed, click to proceed, and that’s all there is to it!

Make a note of your admin password and then click the link to login. On the login screen (worthwhile bookmarking this), enter the username of ‘admin’ and the password you were given, then click on Login. You’re now in your WordPress Dashboard which will alert you to new updates of WordPress in the news area along with statistics on the right hand side about your blog, how many comments are waiting for approval etc.

Updating Details and Password

First thing you want to do now is to update your details and change your password. So click on the link ‘Users’ and then choose ‘Your Profile’. Complete the fields on the page and give yourself a new, more memorable password. Update your account with these details.

So there you have it. You’ve now installed WordPress, logged into your admin panel and changed your password. If you visit the front end of your site (click on the ‘View Site’ link at the top of the admin panel) you’ll see the basic WordPress install with a test post, test comment and test page. If you’re not familiar with the front end of WordPress, posts, comments etc. it may be a good time to familiarise yourself with it now.

You may also like...

5 Responses

  1. Sarah says:

    Latest version is now 2.2, released today.

  2. Chris says:

    Great little article Sarah! Have been wondering about WordPress for a while but being a .Net developer have never really gotten around to installing it. This article persuaded me to bite the bullet and quite literally 5 minutes after uploading my files, I’m adding new content!

    Your tutorial is a little out of date (it’s actually even faster with V2.7) but full marks all the same.

    • Sarah says:

      Hi Chris, yes the article is out of date, but it was written 18 months ago! Unfortunately if I spent time updating every article I’d never have time to write new ones! 😉

      Glad you’re liking WordPress however. Version 2.7 is far superior to any previous version that’s for sure 🙂

  3. If you are having trouble with the installation. It is a good idea to check the “localhost”. The guide says that it is valid in 99% of the cases. In my experience it is more like 60-70 %.

  1. Fri, 17 October, 2008

    […] off you need to install WordPress as you usually would. Once you've got it installed, log into the admin panel and go to Manage […]