Wordpress 101: Installation and setup

November 24, 2008 by Ade Walker  
Filed under Beginner Blogger

Welcome to the next instalment of “WORDPRESS 101″, the series aimed at you - the beginner Wordpress blogger - to help you set up your own self-hosted Wordpress powered blog!

In last week’s article, Wordpress 101: Introduction, we covered the important first steps of choosing hosting and installing useful web development tools on your PC (or Mac). Hopefully you were able to follow these steps and are now ready to get on with the exciting stuff!

Coming up:

  • Downloading Wordpress to your PC/Mac
  • Create a database and associated username and password
  • Configuring the wp-config.php file
  • Uploading and installing Wordpress

As a companion to this article I heartily recommend that you read the detailed installation instructions provided on the Wordpress site, specifically Installing Wordpress. The Wordpress Codex contains a wealth of information on how Wordpress works and how to use it, and the instructions provided in this link are comprehensive and cover a number of different hosting environments.

Decide where to install Wordpress

“On my web-host, of course!”, I hear you ask. And you are right! But before we do any installation a decision needs to be made about where to install Wordpress within your hosting. You have two choices:

  • If your web site will be entirely Wordpress powered, you should install Wordpress in the root directory of your web-hosting. Different hosts identify/name the root directory differently, eg httpdocs, home, web etc. Refer to the instructions provided to you when you signed up with your web-host. These will tell you where your public files (ie those visible to someone browsing your web site) should go.
  • If you have an existing non-Wordpress web site and wish to add a Wordpress blog alongside the existing site, you should create a new sub-directory within your existing root directory eg mydomain.com/blog, and install Wordpress in the new /blog directory.

A number of web-hosts offer Wordpress “pre-installed”. If this is the case, take a break, make yourself a refreshing cup of tea and come back to the later sections of this article…

So, for the rest of this article I shall assume that you are starting from scratch, without an existing site, and that you be installing Wordpress in your hosting’s root directory. Let’s begin!

Download the latest version of Wordpress

Download the latest version of Wordpress, which is version 2.6.3 at the time of writing, from Wordpress.org.

This is the official home of Wordpress and the ONLY place you should ever download Wordpress from. Never download Wordpress from any other site. There are some bad people out there who do nasty things like hiding spyware, redirects, and all manner of other web-nastiness in download files. Download it only from the official Wordpress site. Understood? Ok, end of lecture…

Once you have downloaded the Wordpress zip file, unzip the file into a folder on your desktop, ready for the next stage. The contents of the folder created after unzipping should look something like this:
Wordpress files
Ignore the funny foreign language!

Create a database

Before uploading Wordpress, you need to create the database in your hosting. Web-hosts vary in how they let you do this, therefore what follows can only be a general guide, so follow their instructions and do the following:

  • Create an actual database and give it a name.
  • Create a database user and password.

The database name, user and password can be whatever you want them to be but, to be as secure as possible, don’t choose anything memorable. Certainly the database user name and password should be long and complex, with a mix of upper and lower case characters. The database password user and password are particularly important for your site’s future security - don’t make them easily guessable. In case you ever add other web applications to your site that use their own database, there is no harm in prefixing your database name and user with “wp”. This will help you in the future to remember the purpose of the database and username.

To avoid confusion, the database user and password we’ve been taking about have nothing to do with your web-host or FTP usernames/passwords. The database username and password are specific to using mySQL databases.

Once you have created the database itself, the database user and password, write down these details and keep them safe. We will need them in order to continue the Wordpress installation, and you will need them in the event (hopefully not) you ever have database or Wordpress installation problems in the future.

Configuring the wp-config.php file

Let’s go back to our Wordpress files, which we left sitting patiently in a folder on your desktop…

Open up the file called wp-config-sample.php using your text editor. Then immediately “Save As” and give it a new name of wp-config.php. If you followed my advice here you will remember that you should only ever edit PHP, HTML and CSS files with a plain text editor - never MS Word or similar.

Making sure that you are working on your newly created wp.config.php file, you simply fill in the database, database user name and password in the spaces provided in the file. Take care when editing this file, as even a missing quote mark will stop Wordpress running properly!

For the sake of demonstration purposes, let’s say you have created a database, user and password as follows (note that I’ve added “wp” to the beginning of the database name and database username):

database name: wpTqvi86Fg
database user: wpdDK5Tz
database user password: sJ65rFgpL3Edw

Find these three lines of code near the top of the file and insert your details as shown below:

define('DB_NAME', 'putyourdbnamehere'); Replace ‘putyourdbnamehere’ with ‘wpTqvi86Fg’.

define('DB_USER', 'usernamehere'); Replace ‘usernamehere’ with ‘wpdDK5Tz’.

define('DB_PASSWORD', 'yourpasswordhere'); Replace ‘yourpasswordhere’ with ’sJ65rFgpL3Edw’.

Do not use the examples I have given you - they are just for demonstration purposes - use your own database details!

You also need to enter unique phrases in these lines:

define('AUTH_KEY', 'put your unique phrase here');

define('SECURE_AUTH_KEY', 'put your unique phrase here');

define('LOGGED_IN_KEY', 'put your unique phrase here');

Choose anything you like for these phrases - random characters, bizarre word combinations, a mix of the two, it really doesn’t matter provided they are long (say 20 characters or more), and are not memorable. For information, these phrases are used internally by Wordpress and you NEVER need to remember them in order to use Wordpress.

The final step in configuring the wp-config.php file is an important one for security. Look for this line of code:

$table_prefix = 'wp_';

Change “wp_” to something else - whatever you like, for example “rt3_” or “iudw_”. The reason for this is that every hacker out there knows that the default Wordpress database table prefix is “wp_”, and therefore can exploit server security loopholes to gain access to your database. Therefore, it is strongly recommended that you change the prefix to something that is harder to guess.

Finally, save your file. That’s it! Your basic configuration is completed.

Upload Wordpress to your server

Open up your FTP client programme and connect to your web-host. You need a username and password to access your site via FTP and your web-host should have provided you with a default FTP username and password or, at the very least, instructions on how to create these from within your web-host’s Administration (eg cpanel, etc).

Once connected, upload all of the files to the root of your hosting. As mentioned previously, exactly how your folder structure looks like in your hosting will vary from host to host. For example, if your web host has told you that the folder “httpdocs” is your root directory, upload the folders and files shown in the screenshot (shown further above on this page), to the httpdocs directory.

Don’t forget to upload your new wp.config.php file too! It goes in your root directory.

The FTP upload may take several minutes. Check that all files and folders have been updated. If you are using Filezilla, you can easily confirm this by checking that there are no “Failed Transfers” in the FTP queue.

Installing Wordpress

“Er, haven’t I just done this?” Well, no, you haven’t quite - yet. At the moment all we’ve done is to upload the Wordpress files to the server. We now need to “install” Wordpress, during which Wordpress will automatically configure our previously created database (based on the settings we’ve provided in wp-config.php), create an “admin” user for Wordpress itself, and set up some default settings for your site.

To install Wordpress, open up your favourite web browser (mine is currently Google Chrome, but that’s another story - and perhaps a subject for another article, Candace?).

Then put this address in your browser:

mydomain.com/wp-admin/install.php

Obviously, replace “mydomain.com” with your actual domain name.

If the FTP upload went OK, and the wp-config.php was created correctly, Wordpress will now lead you through a couple more steps of installation before, hopefully, confirming that Wordpress has been installed successfully.

First, you should see this:
wordpress-installation-1

Enter the name of your blog or site and a real email address (this isn’t my real email address, by the way!). Also, uncheck the box which says “Allow my blog to appear in search engines…”. Why? Because we don’t want Google etc to start indexing the site until the site has content and is ready to be launched. Again, this is something that we shall get back to later in this Wordpress 101 series.

Click “Install Wordpress”. Wordpress will now set up your database and do some other “behind the scenes” configurations. This may take a few minutes, so don’t panic! If all has worked as it should, you should now be greeted with this screen:
wordpress-installation-2

You will see that Wordpress has created a Wordpress user called “admin” and provided a password. WRITE DOWN this password! You need it in order to login to Wordpress Admin area for the first time. Don’t worry, you can change the password later - but you must use it the first time you login to Wordpress Admin.

Click “Log In” and you should now see your site’s Wordpress login screen, like this:
wordpress-installation-3

Finally, login to Wordpress using the username “admin” (note: all lower case) and the password that you WROTE DOWN previously, to arrive at your Wordpress administration area (also known as the Dashboard, or backend):

wordpress-installation-4

That’s it! Wordpress is now installed and your web development future is about to really begin!

Enjoy the moment. Feels good, doesn’t it? :-)

Oops! Wordpress didn’t install

If, during the steps described above, you get an error message during the Wordpress installation process, you will have to abort the process and check the following before trying again:

  • Did you create a database and database user and password in your web-host administration?
  • Did you create a wp-config.php file?
  • Did you enter the correct database name, database user and password in wp-config.php?
  • Did you upload the configured wp-config.php file to your server?
  • Did you upload ALL the files and folders from the Wordpress download zip file eg wp-content, wp-admin and wp-includes, via FTP?

Double check these steps and then re-try the installation routine.

Next time in Wordpress 101

Well folks, that’s it for this week. And my word, that was quite an instalment! Hopefully you have managed to follow all the steps and you now have a working Wordpress installation - congratulations! Have a nice cup of tea and put your feet up for a minute or two of well-deserved rest!

Coming next time:

  • Get to know the Wordpress Dashboard
  • Configure some basic Settings in the Dashboard

Finally, please feel free to leave a comment or ask a question or two via our forum. Happy web developing!

This article is syndicated from Studiograsshopper.

Join the forum discussion on this post - (1) Posts

Wordpress 101 : Read more from this series of articles.

Comments

2 Responses to “Wordpress 101: Installation and setup”

  1. WordPress For Dummies For Dummies Computer Tech | blogstuffnow.com on December 3rd, 2008 7:53 pm

    [...] Wordpress 101: Installation and setup [...]

  2. Fast and Secure(ish) Wordpress installer. | Small Business Hosting: Internet Web Hosting Secrets Revealed on January 4th, 2009 11:44 pm

    [...] Wordpress 101: Installation and setup [...]

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





Real Estate Blogs - Blog Catalog Blog Directory Add to Technorati Favorites