Install WordPress on Your New Web Site in 5 minutes

(Reading time: 7 – 12 minutes)

Welcome to the second hour of Website In A Weekend. You have a hosting account, and now we’re going to install WordPress really fast. It only takes about 5 minutes! But you do need to take some notes, so have a cheat sheet ready for marking down user names, passwords and the like.

This article was originally published on February 17, 2009. It’s been revised, corrected and republished. If you find any errors, please leave a comment. Errors will be instantly annihilated.

Install WordPress

Installing WordPress can be quite easy, a matter of minutes.

There are two common ways:

  1. Install using a hosted script such as Fantastico, or Simple Script if on Bluehost. If you use an automatic script such as Fantastico or Simple Script, be vigilant about keeping your site upgraded because these scripts control your upgrade data instead of WordPress.

    Also, you may run into issues with paths, which will affect how files and images are stored. Read more about this in the article “Fix For Not Being Able To Upload Images Properly In WordPress” by Josh Kohlbach

  2. “Manual” install creating databases and passwords. Installing manually takes a little longer, but you will learn a few basic website operation skills that will pay you back later.

I recommend using the manual instead of scripted install, but I’ll provide instructions for both, starting with manual install.

Hey! You're in the middle of the Website In A Weekend eCourse. Learn how to create and operate a complete WordPress-based website in a single weekend. Start here: Website In A Weekend: Friday Evening - Off to the Races. (If you already have a blog... "audit" the eCourse... you'll find plenty to do.)

Manual install

  1. Log in to bluehost.com cPanel for your account. For this tutorial, we’re going to refer to your account name using the fictitious “sitename.”
  2. Scroll down to the “Databases” box, and click on the first (leftmost) icon captioned “MySQL® Databases.”
    MySQL image link in cPanel

    MySQL image link in cPanel

  3. Create a database with a name using letters and numbers. For example, “word1″ which will result in a database named “sitename_word1.” Bluehost always prepends your login name to the database name to ensure your database has a unique name.*
    Create MySQL Database cPanel interface

    Create MySQL Database cPanel interface

  4. Create a database username using letters and numbers, for example: “usr1,” which results in “sitename_usr1.” Make sure that the password is easy to remember, but has a lot of mixed letters, numbers and characters in it.
    Create MySQL database user in cPanel interface

    Create MySQL database user in cPanel interface

  5. Write down your database username, database name and password on a piece of paper. You’ll need these again soon, then you can tear the paper up and throw it away.
  6. Scroll down to “Add User to Database,” and use the drop down menus to add “sitename_usr1″ to “sitename_word1″ database, giving the user ALL rights on the next screen (Check the top middle box).

    Add MySQL database user to database in cPanel

    Add MySQL database user to database in cPanel

  7. Return to cPanel and log out, you’re now done with database creation. You did write down your database, username and password, right?
  8. Download the latest version of WordPress and unzip the wordpress.zip file. You can stash the unzipped WordPress directory on your desktop for convenience.
  9. Configure WordPress to use the database. There’s two ways to do this: A. the easy way, and B. the not-quite-as-easy way. Let’s look at the easy way first.
    1. A. Let WordPress modify the configuration file.
      Hat tip Hat tip : Hat tip: Jennifer Jinright at Gurl’s Asylum provided the following extremely helpful technique which makes manual install even easier.

      This is really easy. Once you have your database installed and the names of the database and database user and password, simply navigate your browser to the URL where you installed your blog, press the buttons and fill in the blanks as necessary. It’s really self-explanatory!

      Letting WordPress modify the configuration when installing.

      Letting WordPress modify the configuration when installing.

      Necessary items for allowing WordPress to configure it's own installation.

      Necessary items for allowing WordPress to configure it's own installation.

      The next screen is where you actually enter all the information. These screenshots came from live installations… not going to broadcast usernames and passwords showing my next screen!

    2. Manually modify the configuration file. Browse the unzipped WordPress directory (probably named “wordpress“) to find the wp-config-sample.php file. You need to make a few changes in this file.

      Edit wp-config-sample.php in a text editor (like WordPad) and change the database name, the database username and the password to match the names and password you created in cPanel (and which you wrote down on that piece of paper). Typically, you will see lines like:

      17
      18
      19
      20
      21
      22
      23
      24
      25
      
      // ** MySQL settings - You can get this info from your web host ** //
      /** The name of the database for WordPress */
      define('DB_NAME', 'mydatabasename');
       
      /** MySQL database username */
      define('DB_USER', 'myusername');
       
      /** MySQL database password */
      define('DB_PASSWORD', 'mypassword');

      Where it says “mydatabasename” you’ll write (say) “sitename_wrd1“… or whatever you have written on your handy paper. Do the same for DB_USER and DB_PASSWORD.

      For now, skip all the authentication variables (AUTH_KEY, SECURE_AUTH_KEY, etc.). Starting on or near line 50 is where you can change the database table prefix from it’s default value of “wp_” to whatever you like.

      50
      51
      52
      53
      54
      55
      56
      
      /**
       * WordPress Database Table prefix.
       *
       * You can have multiple installations in one database if you give each a unique
       * prefix. Only numbers, letters, and underscores please!
       */
      $table_prefix  = 'wp_';

      Renaming the “wp_” table prefix to something else slows down hackers and increase security. Save this file as “wp-config.php.”

  10. FTP all your WordPress files to your server’s public_html directory. If you are using an “addon domain,” say “mycooljunk.com,” this will be the public_html/mycooljunk directory.
  11. Now give the URL to your website in a browser, and follow the very simple instructions to setup WordPress and login. Once you are logged in, you are free to change your password for the WordPress website to something easier to remember. Or leave it as is, because WordPress gives you a very secure default password.

Believe it or not, I can do all of the above in less than 5 minutes! It’s not difficult, but there are a few moving parts, so you should be able to get it done in an hour or so.

Scripted install

Fantastico first:

  1. Login in to cPanel at bluehost.com
  2. Click on the bright blue Fantastico icon near the bottom of the cPanel front page.
  3. Select “WordPress” from the menu of available software.
  4. Fill in the boxes on the left pane of the browser window. Use “admin” for both name and nickname for logins. Use an easily accessible email address to get started. I use my gmail.com account for convenience.
  5. Log in to your new WordPress blog using the information you gave Fantastico, and save the email you get. You may need it later.

I personally don’t use Fantastico because I like to be able to fix any (rare) security issues directly in WordPress without waiting for the Fantastico script to update.

The Simple Script system provided by Bluehost.com is even easier: here’s a screencast for Simple Script WordPress installation.

NOTE: Be careful when upgrading. Both Fantastico and Simple Script store versioning information outside of WordPress. If you upgrade WordPress internally (recommended), neither of these scripts will know, and will continue to prompt you fir upgrades. Annoying.

You can find a breakdown of both manual and scripted procedures shown graphically in my mega-giant WordPress MindMap.



*Bluehost provides you with an account login name used to get to the cPanel interface. They use this 8 letter name in a variety of ways. Here, the MySQL server processes requests for a large number of accounts, so putting your login name before your database name makes it unique, ensuring that you and only you will be able to use that database.


Unleash WordPress: Create a Master Template Blog You Can Copy Anywhere, Anytime

(Reading time: 2 – 4 minutes)

Larry Herrin of NewPalmPre asked about cloning blogs, and I answered.

It turns out, what Larry really wanted… was a breakdown on how to create a master template blog which he could use for installing WordPress anywhere, at any time, and have all the boilerplate nailed down.

Boilerplate. You know, all that boring junk, those web pages required for every serious blog, which you get tired of creating over and over: the Disclaimer… Terms and Conditions… Privacy Policy… etc. etc. etc.

This is a little bit different than cloning an existing blog. Easier in fact.

However, it’s really helpful to have your own locally hosted WordPress installation for testing and packaging. It saves a ton of transferring files back and forth from your host.

Here’s the general idea:

Master Template preparation

  1. Install WordPress, locally if possible. If you have cygwin installed, so much the better. For that matter, if you’re hosted on Bluehost, get your ssh privileges so you can run scripts to automate packaging when you’re done, and after each time you upgrade.
  2. Install your preferred basic plugin suite. I have about 5 I consider mandatory… and another 10 or so which are “almost mandatory.” You can err on the “too many plugins” side, and just delete what you don’t want later.
  3. Add all of your required pages, as described above.
  4. Create the necessary user accounts. Set your security as well.
  5. Fix the copyright, footer text, whatever else you need.

Master Template distribution

NOTE: You need WordPress fully installed on your target site beforehand. Use the checklist in “Install WordPress on Your New Web Site in 5 minutes” for pointers.

Once you have everything prepared, you are ready to distribute. Distribution is a 3-part process:

  1. As shown in the figure below, export [1] your database from your master template into an XML file. You’ll upload this later.
    Use Import and Export for creating master template

    Use Import and Export for creating master template

  2. Zip up your entire master template WordPress installation, transfer it to it’s new host, unzip and install WordPress using your master template. You’ll have all your plugins installed when you’re done.
  3. Import the XML file you exported in Step 1. You’re pretty much done.

The most difficult aspect of this process is the file handling parts. Once you get the work flow down, you still have to make sure you keep your master template up to date with current WordPress and plugin versions. Then rezip everything and put it some place on your system where can find it easily.

I’d love some feedback here as well. Have you created a template for your own use? What was your experience?