Title: Upgrade WordPress Script
Author: Alex Kirk
Published: July 15, 2008

---

# Upgrade WordPress Script

July 15, 2008

Whenever a new version of WordPress comes out (as just [WordPress 2.6](http://wordpress.org/development/2008/07/wordpress-26-tyner/)
did), it is somewhat of a pain to upgrade it.

But not for me anymore, because I have created a small (and simple) script some 
versions ago which I would like to share with you.

`
 $ cat upgrade_wordpress.sh wget http://www.wordpress.org/latest.tar.gz mv www
wordpress tar --overwrite -xzf latest.tar.gz rm latest.tar.gz mv wordpress www

www is my document root and the script sits outside of it. It downloads the most
recent version, extracts it while overwriting the already existing files. The script
doesn’t contain anything extra-ordinary, but makes upgrading real easy.

Of course this script is only useful if you have ssh access to your web server, 
but if you do that script might ease the (almost too frequent) pain of upgrading
WordPress.

[Code](https://alex.kirk.at/category/code/)

Read this next

[bash completion for the pear command](https://alex.kirk.at/2008/05/21/bash-completion-for-the-pear-command/)

### Leave a Reply 󠀁[Cancel reply](https://alex.kirk.at/2008/07/15/upgrade-wordpress-script/?output_format=md#respond)󠁿

Only people in [my network](https://alex.kirk.at/friends/) can comment.

This site uses Akismet to reduce spam. [Learn how your comment data is processed.](https://akismet.com/privacy/)