Upgrade WordPress Using Subversion and Shell Script

Every couple of months or so, a new version of WordPress comes out. If you own a dozen blogs in your arsenal, you will need to upgrade each one of them. Thankfully, there is the automatic upgrade button available within WordPress. But still, you still have to login to each one of them and click on each button to upgrade WordPress. You wish there was an easy way to upgrade all 20 blogs with a single command.

Well, there is a simple solution with the help of Subversion and Shell Script. For several years, I have been using Subversion to upgrade WordPress. Each time there is a new version of WordPress, I just type in a single command to upgrade a dozen blogs or so. For the most part, it takes less than 30 seconds to upgrade a dozen of blogs.

Here is the simple Shell Script:

# A script to upgrade dozens of WordPress installs using Subversion.
echo “Upgrading blog 1cd /home/user/blog1.com/
svn switch $wpv
echo “Upgrading blog2.com”
cd /home/user/blog2.com/
svn switch $wpv
echo “Upgrading blog3.com”
cd /home/user/blog3.com/
svn switch $wpv

and so on….

If you have 20 blogs or so, you will need to include all 20 of them in one little script. You just need to change the “wpv” variable to point to the latest WordPress version. Once you made the change, and depending on the amount of files that has changed from one version to the next, the upgrade process can take anywhere from 10-30 seconds — that’s for 20 blogs!

For this script to work, you will need access to a web server that supports both Subversion and SSH. First, you need to install WordPress using Subversion. That can be easily done using the Subversion Checkout command. Once installed, you can create a simple Shell script like the one above, to execute the upgrade process. If your web host supports both, you might want to consider this little script when upgrading WordPress.

Best Linux Distros of the Decade

It has been a very interesting decade for the Linux Desktop. The first half of the decade was dominated by Mandrake and the latter half dominated by Ubuntu. It’s interesting to know that I have been an avid user of both distros while they were both hot. I am now using Linux Mint, a distro derived from Ubuntu. Time will tell if Linux Mint becomes a favorite. If you are interested to know how your distro fared, check out the Tech Source from Bohol.

Linux Mint 8 Review

I have been using Linux Mint 8 this past month. I love it. Why the switch from Ubuntu? Well, It’s not just the mint green color, although I think it’s an upgrade from Ubuntu’s drab brown. The Main Edition, the flagship release of Linux Mint, provides full multimedia support out of the box, meaning that you can listen to MP3’s watch DVD’s and view web pages that require Flash technology right after install. Simply put, it just works with minimal tweaking.

Why Mint? There are over 300 Linux distributions. Everyone has their own favorite. I chose Linux Mint because it’s based from Ubuntu. It’s something I’m very familiar with. I was a bit surprised to know that Linux Mint ranks third on the DistroWatch ranking trailing only Ubuntu and Fedora. Linux Mint 8 is my favorite at the moment, until something better comes along. Switching distros for me is easy since I keep all my documents in a USB stick. Reformatting a disk and installing a new distro takes only 15 to 20 minutes.

Here are a couple of Linux Mint 8 reviews from Linux Planet and DistroWatch.

Reduce Energy Using PowerTop

Reduce the energy consumption of your Ubuntu Desktop by running PowerTop. A tip from Linux and Microcontroller Tips:

Since version 2.6.21, the Linux kernel has introduced a feature called tickless. The kernel no longer has a fixed 1000Hz timer tick. This will give a dramatic  power savings because the CPU stays in low power mode for longer periods of time during system idle.

A Nice handy tool, PowerTop has been created for reducing the Power Usage of Linux. This application will help to find the software components that are preventing optimal usage of your hardware and give proper suggestions for both hardware and software configurations to reduce power consumption of your system. So Now Your Ubuntu is energy Efficient. It is very useful for Laptop Users.

Canon MX330 $50 Rebate

Two months ago, I bought a Lenovo Q100 nettop running on Windows XP. I thought about installing Ubuntu Linux on it, but I needed a Windows desktop since I don’t have one. Believe it or not, there are valid reasons for having a Windows desktop around the house, albeit an underpowered one.

The Lenovo Q100 runs on 1.6 Ghz Intel Atom 230, not necessarily a speed demon. It’s a bit sluggish, but it’s perfect for email, browsing and writing simple documents. I love it. The only issue I had so far was the latest version of Avast Anti-virus program. The Avast program used up a large part of the CPU resources of the Q100.

I picked up one of those bundled multi-function printers along with Lenovo Q100, a Canon MX330 printer for only $60. What a bargain. Even better, it comes with a $50 rebate. So, today, I received my $50 rebate, almost two months after the initial purchase. It was worth the wait.

Technically, the printer was only $10. Can’t beat that price anywhere.

Fully Qualified Server Name

If you are trying to restart an Apache server running on Ubuntu, Linux Mint or any other Ubuntu derived distro, you will get an warning message that your Apache server does not contain a fully qualified domain name.

Restarting Apache

sudo /etc/init.d/apache2 restart

Warning Message

* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName ... waiting apache2: 
Could not reliably determine the server's fully qualified domain name, using for ServerName [ OK ]

To fix this annoying message, you need to set the hostname:

Set Hostname

sudo hostname computername.domain.com

So, the next time you restart the Apache server:

Restart Apache

sudo /etc/init.d/apache2 restart

There are no more warning messages.

No More Messages

* Restarting web server apache2
... waiting                                                              [ OK ]

Free Linux Training

It’s free as in beer. From Linux Journal:

A little less than a year ago, the Linux Foundation launched a program to provide a variety of training opportunities for Linux professionals. Just a few months later, the Foundation moved the program online, offering web-based sessions of select courses to reach a wider audience. On Tuesday, they took it one step further, announcing the free — as in beer — Linux Training Webinar Series.

The idea behind the Linux Foundation Training Program was to offer job training that would help fill the continuing demand for Linux professionals. The courses would be taught not by professors or lecturers, but by actual Linux developers, including the Foundation’s Technical Advisory Board which boasts names like Ted Ts’o, Jonathan Corbet, Alan Cox, and Chris Wright, among others.