How to installing/updating WordPress using Subversion

The reason I use WordPress as my blog, is because it can auto update plugins, themes and even the WordPress core. In my last post, I have explain how to fix auto-update for themes and plugins. But it would not work on WordPress Core upgrade. The only way left is to use FTP to update the core. Since I hate using FTP, I have to find another solutions.

And here come Subversion to the rescue! With Subversion, I can update the WordPress core with just one line of code and even can schedule it every month. Or I can use Subversion to download and update WordPress experimental/bleeding edge/trunk version.

How to install WordPress

Before you start to installing WordPress using Subversion. You need to make sure the application is install in your server.

# For Ubuntu & Debian variants
sudo apt-get install subversion

# For Fedora & RHEL variants
sudo dnf install subversion

After installing the application. You just need to create a new folder and check out the latest file from WordPress repository.

mkdir MyBlog
cd MyBlog

# If you want the bleeding edge version please use trunk
svn co https://core.svn.wordpress.org/trunk/ .

# If you want the stable version. Please specify the target version. For this How-To i will use 4.3
svn co https://core.svn.wordpress.org/tags/4.3/ .

Keep in mind the dot after the URL is need if you want the file to be put inside MyBlog folder. When the download is complete, you can edit wp-config.php and follow the standard WordPress installation procedure.

How to update WordPress

To update WordPress using Subversion is simple as installing WordPress. All you need to do is to use Subversion update command.

cd MyBlog
svn up

It’s as simple as that. But that only applicable if you running the trunk version. If you are running the stable version, you need to run a different command.

cd MyBlog
svn sw https://core.svn.wordpress.org/tags/4.3.1/ .

After performing the upgrade command you need to run wp-admin/upgrade.php and you finish updating to the latest WordPress.

Leave a comment