Installing WordPress Through SSH

While it is possible to download a ZIP file with the source files for WordPress, unzip it on your computer and then upload the individual files to a client’s Web server, it is generally much easier (assuming the client’s Web server has SSH capabilities) to perform all of those tasks directly on the server. Following are instructions explaining how to do so. The first few steps of these instructions are written assuming that you are using a Windows computer, but the actions after connecting to SSH will be the same no matter which system you are using.

  1. If you have not already done so, you will need to download and install an SSH terminal program such as PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). If you are using a Linux or Macintosh computer, SSH is natively available through the terminal that comes pre-installed on those systems.
  2. Connect to the Web server through SSH. With PuTTY, you will open the PuTTY program, then type in the IP address or FTP address for the client’s Web server, with the “Port” set to 22. Make sure that “SSH” is selected as the “Connection Type”, then click the “Open” button.
  3. A new terminal window will open and will then prompt you for a username. Enter the FTP username that the client provided.
  4. You will then be prompted for a password. Enter the FTP password the client provided.
  5. Then, use the “cd” (change directory) command to navigate to the root Web-accessible directory. For all Site5 accounts, you will initially be logged into the user’s “home” directory, so you will use the following command to move into the root Web-accessible directory:
    cd public_html
  6. Then, use WGET to retrieve the latest version of WordPress from the WordPress server.
    wget http://wordpress.org/latest.tar.gz
    The tar-ball will then be downloaded into the current directory on the Web server.
  7. Next, you will need to extract the contents of that tar-ball. Use the following command to do so.
    tar –xvzf latest.tar.gz ./
    That will extract all of the contents of “latest.tar.gz” into the current (public_html) directory on the Web server. However, all of those files will be contained within a directory called “wordpress,” so you will need to move them.
  8. Move the files out of the “wordpress” directory and into the “public_html” directory.
    mv –f wordpress/* ./
  9. Remove the “wordpress” directory.
    rm –f ./wordpress
  10. Visit the client’s website (type the domain name into your Web browser). You should then be redirected to the WordPress installation file. From there, you will receive instructions explaining how to finish the installation process. You will need to create a new database and a database user for that new DB.