Installing WordPress Easier

I was watching a guy install WordPress a few days ago, and I couldn’t believe what I saw. He downloaded the zip file from WordPress.org, unzipped it, and uploaded all the files to his Web server by FTP. Sure, it works, but why do it that way when you can go SO much quicker? Let’s talk about SSH. While this stuff is pretty technical, once you’ve got a grip on it, you have some real power on your hands.

Prerequisites:

  • You’ve got to have a Linux hosting package that allows you access to the shell (SSH). If you don’t have one I recommend the Linux Business Package from 1and1 which includes 3 domains (Disclaimer: I profit from sales generated from that link). By the way, their lower packages are cheaper but do not have shell access.
  • You need a client to access the Shell. I suggest PuTTY (it’s free)

How to Install WordPress quickly with SSH:

  1. Log-in to the shell with an SSH client, like PuTTY
  2. cd (Change Directory) to the directory you want to install WordPress in. If you’re on 1and1, you will be in the root of your public Web site when you log-in. With other providers, you may have to use the command:
        cd public_html

    or something similar. You need to know which directory you are in. Are you in a directory that is accessed by http://example.com or by http://example.com/some_directory? Where you are now is where WordPress will be located.

  3. Now you’re ready to rock and roll, simply use the following commands to make it happen.
        wget http://wordpress.org/latest.tar.gz
        tar -xzvf latest.tar.gz
        mv wordpress/* .
        rm -rf wordpress

    So, wget downloads the latest release of WordPress to your server, tar unzips it, move takes it out of the wordpress sub-directory into the current directory and rm removes the empty sub-directory.

  4. Now, go to the place you put it on the Web. If you dumped all of those files into the public_html folder of example.com, just head over to http://example.com. If you put them into the folder wordpress, head over to http://example.com/wordpress. The on-screen instructions will lead you from here.

This works for upgrading to new versions as well. When updating, I personally like to remove the wp-content directory before overwriting the files because I don’t want the new files to mess with my plugins or themes.

Use caution with SSH as you are entering commands directly into your Web host’s server. They probably won’t let you run dangerous stuff and mess up their machine, but you could mess up your stuff. For instance, rm -rf * would wipe out everything in the directory you’re in. If you’re in public_html, you’ve just wiped your entire site. Read up before proceeding, but I wanted you to know that there is an easier way to install WordPress and other Web apps.

By the way, if you’re using a host that doesn’t give you shell access, you can sometimes still accomplish this by creating a simple Perl script. I make a Perl script that runs system(); calls if I need to do this. You get to figure that one out on your own.

Related posts



One Response to “Installing WordPress Easier”

  1. Hey, that’s still the old-fashioned way! If you’ve got SSH and a decent host (i.e. one that has the svn Subversion client installed), just run:

    svn checkout http://svn.automattic.com/wordpress/tags/2.5.1/ .

    (for example, or use /branches/2.5/) inside the (empty) directory you want to be your WordPress root. Run through the web install and enter your database and blog information and you’re done. Best of all, you can switch to a new version with the svn switch command at any time, also a one-liner!

    There are a few more tricks than that but the whole deal’s on the WordPress Codex. After your 2nd, 3rd, or 10th WordPress install (or upgrade!) you’ll be, well…really happy you’re using Subversion!

Leave a Reply