In this tutorial I will walk you through the installation of Subversion on Ubuntu, if you have never used Subversion before then you will find this tutorial easy to follow. Perhaps you should read the Subversion entry at Wikipedia to find out more. Like any good system administrator our first priority should be to update and upgrade before installing SVN.
sudo apt-get update sudo apt-get upgrade
Let’s start by installing the Subversion package:
sudo apt-get install subversion
We need to create a central repository where our files will be stored. I chose /home/svn, Let’s use the svnadmin tool to create a path and set up the repository:
sudo svnadmin create /home/svn
Now create a group in order to enable access to the Subversion repository. Create a group named using the following command:
sudo addgroup svn
Now you add yourself to the newly group:
sudo adduser user_name svn
This step needs to be repeated when giving access to a new user to the repository. After you have added yourself to the group, log out and log in to verify that you are an active member of the group. Now we need to enable access to the svn group and set the premissions to the repository.
sudo chgrp -R svn /home/svn sudo chmod -R g+rws /home/svn
If you want to display information about the repository use the following command svn info file:///home/svn Well done, the reposity can be located at. file:///home/svn and file://localhost/home/svn For this tutorial all I need is local access.
I find that installing Wordpress via SVN is far easier in the long run, this becomes evident when upgrading the installation at a later time. Overview of what we want to accomplish with SVN We want to install the current version for WordPress, create a directory “blog” for your blog install and then check out (Subversion command “co”), or extract from the repository, the version of WordPress you have requested. Here are the commands. First create a directory named “blog”.
mkdir blog
Move to the new directory.
cd blog
Have SVN get the current Wordpress release and create the installation directories.
Do not forget the period at the end of the SVN command it makes sure the downloaded files end in the current directory, not including the dot will result in a new installation directory. After the download is complete, edit the wp-config.php with the required changes to complete the installation.
When the Wordpress team releases a new version an upgrade will be required. Because we now use SVN all we need to do is log in to the server and use the “Switch” command to switch to the new version.
cd blog svn sw http://svn.automattic.com/wordpress/tags/2.5.1/
The beautiful part of this process is that all custom and privately owned files will be left intact (example themes, plugins). Run the usual wp-admin/upgrade.php to finish the upgrade.
Browse http://svn.automattic.com/wordpress/tags , to find all the versions of WordPress. Issuing two commands in order to set the automated upgrade process cuts down the amount of time and effort put into maintaining Wordpress. I hope you find SVN to be efficient and easy for Wordpress installations and upgrades than downloading, extracting, and uploading.