Having visited WordCamp UK over the weekend of the 14th and 15th of July in Edinburgh one of the talks spurred me on into thinking about my development environment and how I could improve it. The talk in question was “Totally Custom Theme Development” and was a panel discussion on how we develop themes etc. for clients.
Steve Taylor, Jonny Allbut and Rachel McCollin chaired the panel although there was a lot of audience contribution to the discussions. Essentially it came down to how we add common functionality to our themes. Most of use tend to use a theme to start with that is the same, and will contain a bunch of code that enables certain things in your site. Therefore the debate was had around either putting all this into a plugin or using a parent theme.
Previous to the debate I have used a start theme which I had developed over time. I then changed and altered this theme according to the site that I was building at the time. Jonny pointed out that this is often not the best way of doing things because if you wanted to update some of the functionality that you have in the starter theme it would mean updating all the sites that we built using that manually. Jonny’s workflow was to use a parent theme, in his case the Wonderflux theme framework and then build child themes off of that. That way if you starter functionality changes (in this case the parent theme) you need only to update each parent theme of all your sites. This works although still requires manual uploading of the parent theme on every site. The reason for this is that because the parent or starter theme is not in the WordPress theme repository then the auto update feature is not available.
This got me thinking about whether or not you could make themes (and plugins for that matter) auto update and get the updated version from another location rather than the WordPress theme repository. Then I thought about premium plugins such as Gravity Forms. These plugins are not in the WordPress plugin repository because you have to pay for them, however they still allow auto updates.
At this point I started searching the web for the solution to this problem and how to get themes auto updating from a set location. This is when I came across this Github project from Jeremy Clark. Jeremy has developed a handy chunk of code to do precisely this.
The instructions are very clear and having implemented this I can now host my own theme updates. When I make an update available on my server all of the sites that are using that theme as a parent theme will see the update in the WordPress dashboard and therefore they can auto update to take advantage of the new functionality or bug fixes. As long as the sites are running child themes then they should work just fine.
I am going to give this a go in my next project and see if it works as a development work flow. I have never been a fan of parent and child themes as my child theme always end up with lots of files that will not get updated when the parent theme is updated and therefore ruining the very idea of parent and child themes. Time will tell I suppose and I will blog again with my thoughts on the outcome.
Leave a Reply