If you’re learning the command line like I am, then installing WordPress 3.8 using svn is probably a new experience.
svn, short for Subversion, is an open-source version and revision control system. This makes installing and upgrading wordpress quite easy if not entirely transparent.
The install console commands and a short description of what they do
First access the command line of your web server. I used SSH.
This makes a directory called ‘blog’.
$ mkdir blog
This changes to the directory ‘blog’.
$ cd blog
This uses svn to checkout a working copy from the repository and trailing period makes sure it iterates through all of the subdirectories.
$ svn co http://core.svn.wordpress.org/tags/3.8 .
Now you have your very own copy of WordPress installed on your server. There are still a few more things we have to do though.
This gives the user group ‘web’ ownership of the files. The permissions for the user group ‘web’ have been created by the web host.
$ cd wp-content Change to the ‘wp-content’ directory.
$ chgrp web index.php
Make a directory called ‘uploads’.
$ mkdir uploads
Go up one directory.
$ cd ..
Here things get interesting again. This changes the permissions of the ‘wp-content’ folder and all of its subdirectories and allows read reading and executing of the files for your WordPress site.
$ chmod -R 775 wp-content
This gives the user group ‘web’ ownership of the directory and its subdirectories.
$ chgrp -R web wp-content
The web host I use restricts the directories one is allowed to manipulate, naturally. Normally WordPress uses a /tmp directory outside of the /public directory but we will make a /tmp directory inside of the /public directory.
Make a directory.
$ mkdir tmp
Give the user group ‘web’ ownership.
$ chgrp web tmp
Allow read and executing of the files within the folder.
$ chmod 775 tmp
Next we add some of the administrative subfolders to the ‘web’ group:
$ chgrp web wp-admin/async-upload.php
$ chgrp web wp-admin/media-upload.
$ chgrp web wp-admin/post.php
Next you create MySQL process, user, and database as well as run the WordPress installation but all of that is away from the command line.
Open up the ‘wp-config.php’ file in the nano text editor so that we can append
define('WP_TEMP_DIR',ABSPATH.'tmp'); to the end of the file. This points WordPress to the new /tmp directory we created earlier.
$ nano wp-config.php
Save the file and we’re almost done.
Finally, limit the permissions of the wp-config.php file to minimize mischief.
$ chmod 644 wp-config.php
That’s it. Maybe not one of WordPress’s famous five-minute installs but making one’s aquaintence with the command lines makes it all the more satisfying.