Archive

Posts Tagged ‘subversion’

Upcoming Article: Ubuntu Server to WordPress in 15min

September 6th, 2010 1 comment

I know I haven’t been blogging much lately. I’ve been occupied with other responsibilities. Besides work and school I’ve been dedicating a lot of time volunteering on the GNOME Sysadmin team, trying to make sure that it remains a well-oiled development machine! I had a few minutes this evening however and I thought I would give you a heads up on an article I’m waiting to have published.

As some of you know, I have been writing off and on for Packt Publishing‘s online Article Network. I’ve covered a number of Ubuntu related topics such as: “What’s New in Ubuntu 9.10“, “Network Based Ubuntu Installations“, “Ubuntu 9.10: How to Upgrade“, “Creating Local Ubuntu Repositories“, “Five Years of Ubuntu“, “Ubuntu User Interface Tweaks“, “Install GNOME-Shell on Ubuntu 9.10“, “Securely Encrypting Removable Media“, and “Folding @ Home on Ubuntu“.

My latest article, which should be published this week sometime, is a quick-install guide to Ubuntu Server 10.04 toward the goal of a “LAMP” web-server. The article includes screenshots for installing Ubuntu Server, installing the Apache, MySQL and PHP components, and installing a WordPress installation, managed by subversion. It probably sounds like there is quite a bit to it, doesn’t it?

The best part of the article is that you can go from zero to WordPress in fifteen minutes! I’ve timed it. Twice. I setup a virtual machine and by following these instructions I can go from no operating system to a working WordPress installation in under fifteen minutes. It’s really quite amazing! Ubuntu Server is so user friendly, and they’ve put in enough attention to the little details, that really anyone can set up a web server and start publishing content in no time!

I have a follow-up article in the works (still a few weeks out, at least) which outlines expanding your web server to include SSL, virtual hosts (multiple sites), managing and upgrading your WordPress engine using subversion, and more.

I’ll post links when both of these publish. Until then…

Christer

Maintaining WordPress Installations – The Easy Way

February 27th, 2009 4 comments

I’ve seen a few posts over here regarding problems with an unmaintained WordPress installation. It definitely can be work to manage software that is not covered within the supported repositories (WP is in the repositories, but its not updated as frequently as upstream). I thought I would cover how I maintain my installations and hopefully they can help others simplify their process.

First of all let me outline the setup that I have.  I run a number of virtual hosts on my web server.  Probably close to a dozen WP installations, plus a few other sites.  I’ve simplified the installation and updating process for these by using svn, which has been an option from WP for some time now.  Example:

To install a new WordPress blog using svn:

svn co http://svn.automattic.com/wordpress/tags/2.7.1/ .

note: You’ll, of course, want to update the “2.7.1″ tag with the current version at the time of your installation.

note: Make note of the “.” at the end of that command.  Yes, it’s required.  Yes it’ll install WordPress to the directory you run the command in.

To update your installation when word gets out that there has been a new release:

svn sw http://svn.automattic.com/wordpress/tags/2.7.x/ .

note: see notes above ;)

Now, if you’ve got a number of virtual hosts and multiple wordpress installations installed you could do something like I’ve done and script the process.  Here is an example script I use to update all of my wordpress installations with one command:

#!/bin/bash
# wp-update.sh
# update wordpress installation(s) to $1 branch
#
# this script takes the new branch as an argument


DOMAINS="domain1.tld \
domain2.tld \
domain3.tld \
domain4.tld \
domain5.tld \
domain6.tld \
domain7.tld \
domain8.tld \
domain9.tld \
domain10.tld \
domain11.tld \
domain12.tld"

if [ $# -ne 1 ]; then
echo "EPIC FAIL: Missing new version!"
echo "Try: ./wp-upgrade x.x.x (ie; 2.7.1)
exit 1
fi

for site in ${DOMAINS}; do
echo "upgrading ${site}"
echo
cd /var/www/virtual/${site}/html/
svn sw http://svn.automattic.com/wordpress/tags/$1/ . &>/dev/null
done

The only things you’ll really need to keep in mind to use this script are:

  1. You’ll need subversion installed.
  2. This assumes a virtual host path of /var/www/virtual/${domain}/, and WP root of html/.  Update as necessary.
  3. You’ll need to chmod +x this script.

Once you’ve saved and update the script according to your setup you’ll simply want to run the script anytime you get word of a new WordPress release:

./wp-update.sh 2.7.3

Done.  Simple.  Enjoy.