1

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:

  1. Make changes to my Wordpress theme in my local environment,
  2. Commit code into a Subversion repository that is accessible by production and testing environments,
  3. Then I log into my staging / production Wordpress control panel,
  4. Go to the Appearance | Themes section,
  5. 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.

2
  • 1
    I've done /something/ like this -- but rather than using the WP admin to "update", we used SVNs post-commit hook to push the updates to the staging server. A roll-back in the SVN would result in a roll-back on the staging server as well. Commented Aug 10, 2012 at 21:18
  • Kev SO mod here - just a quick FYI - please flag and ask for a mod to migrate your question instead of cross-posting. Thanks.
    – Kev
    Commented Aug 11, 2012 at 0:15

1 Answer 1

1

Too late, not implementing all requested functionality, require some actions-in-the-middle (between commit to SVN and checking for update on WP), but:

  • It seems to work
  • It works for themes and plugins, placed at independent sources

Own Wordpress update-server, reachable from WP-Admin side

  1. WordPress Self-Hosted Plugin Update API description of principles and usage
  2. Code of project (actively maintaned) on GitHub

In short: * Solution for creating own Plugins/Themes update server (themes/plugins from this server can coexist in WordPress with extensions from default WP location) * API-server and update-server may share the same host or work from different (TBT!) * Updates distributed as zip-files from common updates-location * Updating (adding new) distributed extension require changes in api/packages.php file in order to inform clients about published update

Two latest point means, that developer of distributed over server content can not only commit and relax, SVN-repository have to have some type of (smart) post-commit hook, which will be able

  • zip HEAD of code
  • deploy this zip to upload-folder
  • update packages.php by correct new information

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.