SVN Wordpress Updater

Ever have a whole mess of svn WordPress installs you needed to update. Hate doing them one at a time? Use this program to update a whole bunch, or a single install. All you have to remember is the program name, two flags, and the version you want to use.

Current Version

wpupdate 1.5.2 (03.19.09)

Usage: wpupdate [OPTIONS]… [VERSION NUMBER]
Switch or update the WordPress install(s) to the VERSION NUMBER.

Example: wpupdate -f /home/wp-versions -u -b 2.7
This would update all of the installs listed in wp-versions to the 2.7 branch.

“wpupdate -h” for help

OPTIONS:
-f path to a file containing a list of paths to WordPress installs, can
not be used with -i (single install) option. File must consist of full
paths in the form “/wwwroot/sites/mossiso.com/blog/” each on a separate
line. A “;” semi-colon designates a commented line.

-i path to  a single svn install, can not be used with -f (versions file)
option

-s svn URL to use for updates (defaults to http://svn.automattic.com/wordpress)

-u use “svn update”, can not be used with -w (switch) option
-w use “svn switch”, can not be used with -u (update) option

-b use the branches, can not be used with -t (tags) option
-t use the tags, can not be used with -b (branches) option

-o path to output file containing report of svn update. File will be
created if it does not exist. The directories must already exist. The
default is to save it to your home directory (ex. /home/ammon)

-h display this help info
-v outputs version information and exits

WHAT IT DOES:
First the wpupudate program makes a backup copy of the MySQL database and
the wp-contents/ directory. It places these backups in the WP install directory.

A WordPress version must be specified. By default the WordPress installs
are upgraded to the specified branch install. If the -t (tags) option is
used, the installs will be updated to the specified tag version. If the -w
(switch) option is used, then the installs are switched to the branch (by
default) or tag (with -t option) version specified.

THINGS TO KNOW:
The program must be run as root, sudo, or a user with absolute privileges
over all files in the WordPress folders.

If the -f or -i flags are not given on the command line, the program will
attempt to update the current directory.

You will be prompted for a MySQL user and pass that must have access to all
of the databases (ex. MySQL root or admin account).

———————————————————————————————–

WP Versions

This little script will output a file with all of the WP installs (svn and non) on your server. It uses the ‘locate’ command, so the results will typically show what was on the server the day before.

USAGE:
When using this script with the WP Update script above, you will need to edit the generated file and remove the leading semi-colon ‘;’ from the lines containing the install paths you wish to update.

wpversions 1.2 (03.17.09)

Categories