Install WordPress from the command line using SSH

WordPress install using SSHSometimes it is easier to install WordPress on your web host without downloading it to your computer and then uploading it to your website. This can be particularly important if you are on a slow connection at home as upload speeds (sending things to your website) are usually even slower!

If you can connect to your web server using SSH then you can ask your server to download the file from WordPress directly. Connect using an SSH client like putty and navigate to the directory where you want to install WordPress

use the wget command to get the latest version of WordPress as a single compressed file

wget http://wordpress.org/latest.tar.gz

use the tar command to uncompress and unpack this file into a directory called wordpress

tar -xzvf latest.tar.gz

The WordPress package will extract into a folder called wordpress in the same directory that you downloaded latest.tar.gz.
Now, use the mv command to rename the wordpress directory to something else (it’s good practice to install WordPress into a subdirectory with a secret name)

mv wordpress somethingelse

Now you have all the base WordPress files installed and you can go to your web browser and kick off the famous 5 minute install – it should be even faster since you have already don the first few minutes!

Go to http://www.example.com/somethingelse

Where the ‘www.example.com’ is your domain name and the ‘somethingelse’ is whatever name you chose when renaming the default WordPress directory above.

You will need to have created the database and database user that you want to use.

Don’t worry about this extra ‘somethingelse’ part to the URL at the moment. Once WordPress is installed you can configure it so that it looks like it is at www.example.com even though it is living neatly and more securely in a subdirectory.

More on reconfiguring WordPress in a subdirectory later,

Brian
your ‘Peoples Geek’

 

This entry was posted in WordPress and tagged , . Bookmark the permalink.