» WordPress » How to install Wordpress

Kevin MuldoonHow to install Wordpress

Written by Kevin Muldoon from System0 on June 11, 2007

I recently received some questions about installing wordpress which made me think it think it was about time i wrote a detailed guide about how to install wordpress from scratch. I’ve mentioned before how easy it is for those with experience in running websites and blogs to forget that not everyone has did a script installation hundreds of times. For me the wordpress installation is a walk in the park however that’s because i have installed hundreds of php scripts like this one (im not lying - ive tried out a crazy amount of scripts in the past few years!!!).

I wrote this post to help readers install a new copy of wordpress on their host, however it should help anyone who has some questions about installing other blog or php scripts on their host as the wordpress installation is identical to just about every php script available on the net. The reason for this is that once you have told the script know how it can access your database, it usually guides you through the rest of the installation. This usually involves just clicking ‘OK’ or ‘next’.

Although i believe that this guide will help you understand how to install most php scripts, if there is a blogging script you like and you’re really struggling with it please let me know and i can either write an installation guide like this one or walk you through it in the Blogging Tips Forums.

You should use this guide in conjunction with the official wordpress installation documentation - i am not trying to replace the official instructions which in my opinion are very good, however i hope that the screen prints etc i use will make you understand the process better.

Enough small talk, lets start the guide! ;)

Step 1 - Download Wordpress

The latest version of wordpress can be downloaded from here. The minimum requirements for running wordpress on your host is PHP version 4.2 or greater & MySQL version 4.0 or greater so make sure your hosting package has these (99.9% will!).

When you unzip the zip file you will see a wordpress folder and in that folder you will see the files below :

Wordpress Filelist

Step 2 - Setting up your Database

This is a step i believe some newbies have difficulty with but once you understand how it works you will see that setting up a database is very easy thing to do. I will be showing you how to add a database using Cpanel however the steps i will be showing you here are the same if not very similar in all hosting admin areas.

Your version of cpanel may look a little different but it should look something like the image below :

Setting up the database

As you can see, the section you need to click on is called MySQL® Databases. When you click on the link you are brought to the mysql database main page which looks like this :

Setting up the database

In this section you need to

  • Create the database
  • Set up a user with password
  • Give the user full permissions for the database

Please note, if your database or user name is too long it may be cut off after 7 or 8 digits.

Create the database

All you need to do is put a name for the database and click on ‘create database’. It doesn’t matter what you call it though i would recommend calling it blog or blogs (If you are hosting a few blogs on the one domain then you might want to call it something else).

The full name of your database is not what you just entered in the text box to name it, it is your hosting username and underscore and then that name….confused? :) Don’t worry…i’ll explain.

Say you login to your hosting area with the username myblog and you created a database called blogs.

In this scenario, the name of your database would be myblog_blogs.

Note, some host’s do not add the hosting username before the database name. Check your mysql database info page to be sure (and if your still unsure ask in the Blogging Tips Forums).

Create the user and password

Just like creating the database, all you do is add the username and pass you want and click ‘Create User’. In Cpanel, your hosting username is added to the start of your username much the same way as the database name.

Therefore if you chose ‘blogga’ as your username and ‘blogtips’ as your password your mysql user and pass would be :

Username : myblog_blogga
Password : blogtips

Give the user full permissions for the database

By this point you should have a database and a username. However, you have to make sure you give that user full rights to access the database so you need to go to the ‘Add Users To Your Databases’ area of the database page. It should look something like this (ive removed the reference to my database) :

Giving the user full access

All you need to do is select the user, select the database for your blog, make sure ALL is selected for privaleges and then click the ‘Add user to database’ button. By doing so you have ensured that the user can access the database.

Step 3 - Add your Database details to the wp-config.php file

The eagle eyed amongst you will have noticed that the config file in the root directory of wordpress is actually named wp-config-sample.php. The first thing you need to do before proceeding is rename this file to wp-config.php. Once you have renamed the file, open the file up in a text editor such as Textpad.

You should see this :

<?php
// ** MySQL settings ** //
define(’DB_NAME’, ‘putyourdbnamehere’);    // The name of the database
define(’DB_USER’, ‘usernamehere’);     // Your MySQL username
define(’DB_PASSWORD’, ‘yourpasswordhere’); // …and password
define(’DB_HOST’, ‘localhost’);    // 99% chance you won’t need to change this value
define(’DB_CHARSET’, ‘utf8′);
define(’DB_COLLATE’, ”);

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix  = ‘wp_’;   // Only numbers, letters, and underscores please!

// Change this to localize WordPress.  A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (’WPLANG’, ”);

/* That’s all, stop editing! Happy blogging. */

define(’ABSPATH’, dirname(__FILE__).’/');
require_once(ABSPATH.’wp-settings.php’);
?>

All you need to edit in the wp-config.php file is the DB_NAME, DB_USER and DB_PASSWORD variables - replace putyourdbnamehere with your database name, usernamehere with your database username and yourpasswordhere with your username password. That’s it!

If i edit the wp-config.php with the database details i used as an example before i would have :
* changed highlighted in red.


<?php
// ** MySQL settings ** //
define(’DB_NAME’, ‘myblog_blogs‘);    // The name of the database
define(’DB_USER’, ‘myblog_blogga‘);     // Your MySQL username
define(’DB_PASSWORD’, ‘blogtips‘); // …and password
define(’DB_HOST’, ‘localhost’);    // 99% chance you won’t need to change this value
define(’DB_CHARSET’, ‘utf8′);
define(’DB_COLLATE’, ”);

// You can have multiple installations in one database if you give each a unique prefix
$table_prefix  = ‘wp_’;   // Only numbers, letters, and underscores please!

// Change this to localize WordPress.  A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (’WPLANG’, ”);

/* That’s all, stop editing! Happy blogging. */

define(’ABSPATH’, dirname(__FILE__).’/');
require_once(ABSPATH.’wp-settings.php’);
?>

Step 4 - Upload Your Wordpress Files to Your Host

The next thing you need to do is upload all of those wordpress files to your webhosting space. A few days ago i wrote a guide showing you ‘How to upload files to your host using FTP‘. If this is the first time you have had your own webspace and you’re not sure how to upload files then i strongly encourage you to read this article before reading the rest of this guide :)

The only thing you need to decide in this step is where to upload your wordpress files.

Step 5 of the Famous 5 Minute Install states that :

  • If you want to integrate WordPress into the root of your domain (e.g. http://example.com/), move or upload all contents of the unzipped WordPress directory (but excluding the directory itself) into the root directory of your web server.
  • If you want to have your WordPress installation in its own subdirectory on your web site (e.g. http://example.com/blog/), rename the directory wordpress to the name you’d like the subdirectory to have and move or upload it to your web server. For example if you want the WordPress installation in a subdirectory called “blog”, you should rename the directory called “wordpress” to “blog” and upload it to the root directory of your web server.

To summarise, if you upload the files inside a folder called wordpress then your blog will be installed at www.yourblog.com/wordpress/. You can obviously rename the wordpress folder to ‘blog’ or something similar. Most of you however will want to upload the files to the root of your domain and to do that you just need to make sure you select all the files and upload them to your root directory.

Step 5 - Running the Wordpress Installation Script

From here on in the installation is a walk in the park - Wordpress does all the work for you!!!

You need to run the wordpress installation script located at http://www.yourblog.com/wp-admin/install.php. However, if you access the main page of your blog you will see a link to the install screen like this :

Installing Wordpress

When you click on the link you are taken to this screen :

Installing Wordpress

The first and only step of the installation is to enter the name of your blog and the email you want the admin to have. You don’t have to think too long about the name of your blog as you can change it at any time once the blog has been installed.

Installing Wordpress

Once you have entered the name of your blog and your email address you are taken to the last page of the installation. This page gives you a temporary password for you and shows you a link to http://www.yourblog.com/wp-login.php. Make sure you take a note of the admin password before you move on.

How to install Wordpress

And that’s it - you’ve just installed a wordpress blog!!!

Other Helpful Resources

These links are taken from the wordpress installation page :

Wordpress Official Installation Guide - Please use my guide in conjunction with the official guide
Brandan Booth’s Everyman’s WordPress Installation Guide - 2mb pdf document - has a very good section explaining how to add a database
Wordpress Setup - Web Installer - Installs wordpress for you if you provide connection details

Summary

Wordpress is the best all round blogging script available in my opinion. It’s easy to run and modify and i hope i have also shown you how easy it is to install. Wordpress rave about the ‘5 minute install’ - what they don’t tell you is that 4 minutes of that involves uploading the files!! Seriously, the whole process is quick and painless :)

If you have any questions regarding this guide or installing wordpress please leave a comment here or post a thread in the forums and i’ll do my best to help.

Thanks,
Kevin

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Bumpzee
  • E-mail this story to a friend!
  • Ma.gnolia
  • Print this article!
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
Written by Kevin Muldoon from System0 on June 11, 2007 | Filed Under WordPress
Unique Blog Designs

24 Responses so far | Have Your Say!

  1. Mani Karthik  |  June 11th, 2007 at 7:38 am #

    Mani Karthik - Gravatar

    The ultimate resource to setting up wordpress - you did it Kevin !

    Rock on!
    Mani

  2. anon  |  June 11th, 2007 at 8:12 am #

    anon - Gravatar

    I previously commented that I had stopped subscribing because of posts like these (”how to do something incredible easy that any howto/install guide will tell you in no-time”), but I would add it back and see what happened.

    I guess I just thought this would be about more advanced things than small technicalities. You do a good job at presenting it, so I guess there is value in this, just not for me.

    Good luck!

  3. pearl  |  June 11th, 2007 at 9:57 am #

    pearl - Gravatar

    I got my domain yesterday and now is the time to start thinking about moving to wordpress for me!! Perfect timing for me and I am definitely going to refer to your instructions!! thanks

    http://fresh-perspectives.net

  4. Wallace  |  June 11th, 2007 at 11:05 am #

    Wallace - Gravatar

    Wow,it is a nice reading,
    as i have not a wordpress blog up to now.
    and i just prepare to launch a new site by wordpress for design gallery showcase.

  5. Sourav  |  June 11th, 2007 at 11:16 am #

    Sourav - Gravatar

    I think I would also go with anon, apart from the presentation there is not even a signle information which I can’t get it from the wordpress website….

    I have been reading your post - quiet regularly - but this is not done to your reputation…

  6. Kevin  |  June 11th, 2007 at 4:38 pm #

    Kevin - Gravatar

    anon/Sourav - these guides have been written for complete novices and are in response to common questions i am getting in my email box. You can get this information in the wordpress site and i state just that in my post, however some of the steps will be difficult for people who have never run a website before.

    im sorry it wasn’t to your liking however i will continue to cover things like this if people are coming to me with questions about it :):)

  7. GoddessCarlie  |  June 11th, 2007 at 9:38 pm #

    GoddessCarlie - Gravatar

    I think these types of posts are good and sometimes even someone advanced in installing scripts can get it wrong, wondering what they did wrong (when they skipped over or missed a little step). Cater for the newbies, but I’d also like to see more advanced posts. :)

  8. Jack Books  |  June 12th, 2007 at 10:43 pm #

    Jack Books - Gravatar

    hm.. I think Kumiko already know about this :)

  9. pearl  |  June 13th, 2007 at 5:22 am #

    pearl - Gravatar

    well, I must say thanks for writing this Kevin… ‘cuz if everyone started labeling their blogs, for novices or for experts, would defeat the purpose of having that wide open learning community of bloggers.. and people could be experts at installing wordpress and not know a heck whole lot of other things! I wouldn’t call them experts!!;) and others novices.. :)

    sorry i had to say this one!

    btw, you’ve been subscribed!!

  10. shypys  |  June 13th, 2007 at 7:35 am #

    shypys - Gravatar

    Thanks. I’m moving to wordpress too in a couple of months , so you never no when it may come handy.

  11. Ade Lamidi  |  June 13th, 2007 at 8:45 pm #

    Ade Lamidi - Gravatar

    Very useful post. I have always wanted to know how to install Wordpress on my servers.

  12. Make Money Blogging  |  June 15th, 2007 at 12:19 am #

    Make Money Blogging - Gravatar

    Thanks for this post. I think the screenshot is a great help and gives a clearer picture to WP dummies like me ;) I’m hosted on blogger and am considering switching to WP now.

  13. Em  |  July 1st, 2007 at 10:59 pm #

    Em - Gravatar

    Thanks for the helpful information Kevin. I appreciate your sharing attitude. Please forgive me for making this post part accolade and part criticism. Your grammar is atrocious and pathetic. It seems to be a common denominator on the web today. Does anyone use a spell checker or grammar checker? I think not. In the spirit of positivity, I would like to see the quality of language usage improve across the web. A steady degradation over time will lower our conciousness and our ability to communicate with others. As communication degrades and debate ceases, war is inevitable. History proves it. Isn’t communication what the web is all about? I hope you and your readers take this post with an open frame of mind and begin a debate on the merits of proper usage of the language. Thanks for indulging my little diatribe and thanks for the good advice.

  14. Shay  |  July 6th, 2007 at 4:15 am #

    Shay - Gravatar

    This has been really helpful! Thanks a lot!

  15. Roseate - Internet Business Promotion & Opportunities  |  July 11th, 2007 at 10:33 am #

    Roseate - Internet Business Promotion & Opportunities - Gravatar

    Hi Kevin,

    Thanks for this useful info.

    In Step 1 - Download Wordpress…in the page there are two downloads (one for .zip and one for .tar.gz) which one I should download? or both?

    Thanks,
    Roseate

    do

  16. Kevin  |  July 11th, 2007 at 10:36 am #

    Kevin - Gravatar

    Roseate - It doesn’t matter, both contain the same files. However, it’s probably best for you to just download the .zip file.

  17. Roseate - Internet Business Promotion & Opportunities  |  July 11th, 2007 at 1:53 pm #

    Roseate - Internet Business Promotion & Opportunities - Gravatar

    Thanks a lot :)

  18. mike  |  July 13th, 2008 at 8:33 am #

    mike - Gravatar

    hey can I transfer my wordpress article to joomla?

Trackbacks to 'How to install Wordpress'

  1. How To Install WordPress In 5 Simple Steps | Easy Wordpress
  2. How to Install Wordpress - BloggingTips.com
  3.   Is content stealing on the increase?
  4. Moving from blogger to wordpress - the whole story
  5. All about Wordpress - Themes - Plugins » How To Install WordPress In 5 Simple Steps
  6. Make Money Online At Roseate Marketing Tips

Leave Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>