WPTestSetup is a PHP shell script that sets out a WordPress SVN-based testing environment, by checking out the versions you specify automatically.
Intended users
Plugin or theme developers who want to test their creations across many WordPress versions.
How to use
Place the script in a directory within your document root where you want the versions to be retrieved
$ ./wptestsetup
This script will check out WordPress subversion repositories automatically.
It uses a single database for all installations, and prefixes the tables with the WP version
usage: wptestsetup [options]
Valid options:
--version=val : Retrieves a specific version VAL
--since=val : Retrieves all versions bigger or equal than VAL
--url=val : VAL is used as the URL to the SVN WordPress repository Tags listing
--svn=val : Use VAL as svn command instead of resorting to $PATH
--chmod=val : Use VAL to chmod the checked out directory instead of 775
Examples:
./wptestsetup --since=2.2
./wptestsetup --version=2.7.1
The result
Running the command above will result in all versions neatly retrieved:
$ ls
2.5 2.6 2.6.2 2.6.5 2.7.1
2.5.1 2.6.1 2.6.3 2.7 wptestsetup
The permissions are set for the user to quickly go through the installations. A single database with multiple prefixes (one per version) can be used to test them.
if ( comments_open() ) { ?>