WPMU Command Line Installer/Updater

Hey folks,

I’m working on a project for personal use that I think would be useful to others. The basic idea is a CLI interface for installing WPMU and custom plugins, and then upgrading WPMU. Since so many plugins on this site live outside of the wp-content directory, I started to worry that upgrades would be a real pain, so I’m writing a little script that copies/symlinks everything each time you install a new version. Here’s an example:

$ php ip.php

Action [help]: install

Customizations Directory [/home/wpmusite/src/custom]:

WPMU Version Number [2.7.1]:

WPMU Source Directory [/home/wpmusite/src/wpmu-2.7.1]:

Install Directory [/home/wpmusite/live-2.7.1]:

Document Root [/home/wpmusite/public_html]: /home/wpmusite/www

Install? [no]: yes

Creating install directory... done.

Moving source files... done.

Symlinking custom files...

/home/wpmusite/src/custom/.htaccess... done.

/home/wpmusite/src/custom/wp-config.php... done.

/home/wpmusite/src/custom/wp-content/mu-plugins/myplugin.php... done.

Ready to make live? [no]: yes

Unlinking old document root... done.

Symlinking /home/wpmusite/www to /home/wpmusite/live-2.7.1... done.

Install complete!

Above is the current output of my version. My directory structure is something like:

/home/wpmusite/www (symlink to current install)

/home/wpmusite/live-2.7.1 (current install)

/home/wpmusite/src/custom/ (all my customizations — mirrors wpmu root directory, so for example /home/wpmusite/src/custom/wp-config.php will get symlinked to /home/wpmusite/www/wp-config.php)

/home/wpmusite/src/wpmu-2.7.1 (wpmu source)

Any comments/suggestions are welcome. When it’s working I’ll post the source here. Also, I haven’t started working on the upgrade side, so any thoughts would be helpful.