August 24th, 2008 @ 1:49 pm

WordPress 2.6.1

WordPress › Blog » WordPress 2.6.1
Check out the full list of over 60 fixes to see if 2.6.1 has something to offer you. A full diff and list of changed files is also available. Download 2.6.1 and enjoy.

I know its against “best practices” but I have file level and database backups already anyway, so I wrote a script to upgrade my Wordpress install with minimal effort on my part.

./wordpress.sh gets the job done


cd /htdocs/www/
wget http://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
cp -Rfv wordpress/* blog/
rm -rf wordpress
rm -rf latest.tar.gz

There is probably a better way, some sort of argument for the cp command that would extract it over the blog directory, but this works well, its still super fast, and I dont have to worry about forgetting which arguments to use for cp.  I used to always end up with a wordpress directory inside of my blog directory instead of merging the two.

As a note:

I back up my mysql database with this in my /etc/cron.monthly for example:

mysqldump --add-drop-database --add-drop-table -A -p####-u ####| gzip > /backups/monthly/sql.gz

This is a weekly backup of my blog directory:

tar -zcf /backups/monthly/blog.tgz /htdocs/www/blog/

Leave a Reply

Comments for this post will be closed in 14 hours.