I’ve just created a small WordPress plugin, Control Live Changes. It’s currently only on GitHub. It helps manage the disabling of core and plugin/theme changes when you’re working with a Version Control System.
Here’s my situation. I have a bunch of sites versioned with Git via Beanstalk. I commit to the repository my custom theme, all the plugins (I occasionally hack plugins), and a few files in the root (e.g.
.htaccess). I don’t version the WP core files.
There are other developers working on these sites, too. We all have development copies running locally (the master branch), and there are branches for the staging and production servers. I created this plugin because I wanted to make sure no one upgraded plugins on the staging and production servers, making them out of synch with the dev master branch. Plugins should be upgraded locally (and tested), then pushed to staging for testing, and thence to production.
So, this plugin detects whether or not we’re in a development environment by searching for a particular configurable string in the
HTTP_HOST (default: “localhost”). If this string isn’t present, the stuff that does the disabling kicks in. By default it disables plugin/theme upgrades and file editing, but you can also set things to disable core upgrades, or enable plugin/theme changes. There’s also a configurable option to show notices explaining why plugins etc. can’t be upgraded. Check the readme for details.
I’ll wait a while to put the plugin on the wordpress.org repository. Meanwhile, feedback very welcome! Post general comments here; if you find a genuine issue, use the GitHub issue tracking.