Update a custom theme with Subversion?
Before I start: I’m not sure if this is feasible so any guidance, suggestions, criticisms are welcome.
I’m looking for an easy way to deploy my WordPress theme code from my development environment (local computer running WAMP) to my staging and production environments (both are hosted servers). The ideal workflow I am looking for would utilize Apache Subversion as my source code repo and would look like this:
- Make changes to my WordPress theme in my local environment,
- Commit code into a Subversion repository that is accessible by production and testing environments,
- Then I log into my staging / production WordPress control panel,
- Go to the Appearance | Themes section,
- Click Update Theme button on my theme’s display panel that updates my theme from the trunk of the corresponding SVN repository.
Nice to have:
- A way to roll changes back to a previous version,
- A notification telling the user that there is an update available,
- A way to commit code directly from within WordPress (if you changed anything using the theme editor in WordPress)
If this doesn’t exist, I’m thinking about developing a plug-in that will achieve the above. The key is that everything happens directly through the WordPress Admin panel. Using the command line on each server is not an option for me.