Live data from Hacker News

Version Controlling Wordpress

roybarber.com

11–20 of 21 posts

Re: Version Controlling Wordpress

#11
We've struggled with this quite a bit at our company (http://thesiteslinger.com). Much of our web development business includes WordPress...We host most of our client sites on WPEngine so the git push feature has made a lot of it easier but keeping your .sql files versioned correctly from live and local development is a pain, to say the least.

I would disagree that everything can be left up to the one click updater, versioning it all is important. That assumes you aren't creating complex functionality on your site, so no updating tables, custom development or anything that changes more than views.

It will be interesting to see if WordPress can continue to improve and grow and get new users. From a growth perspective it seems more and more like wordpress:php as rails:ruby, bringing people to the platform en masse.

Re: Version Controlling Wordpress

#12
At this time my comfort zone is managing each theme and plugin as a separate Git repository and using WP Engine to rollback if I break anything during a WordPress/theme/plugin upgrade. WordPress is just upgraded using the 1-click upgrade, and plugins are upgraded using 1-click if they're on the official repository.

Re: Version Controlling Wordpress

#14

I do version control on my themes. What I ended up doing is having a repo outside the web server and setup a post receive hook that checks out the latest version to the actual public folder.

Same here. I'm not sure I see the need to version control the entire Wordpress install, seems like it makes things a bit messy.

Re: Version Controlling Wordpress

#17
Thanks! This gave me some great ideas for how I can use this method in my own deployment process. The only exception is that many times I need to sync content both downstream and upstream.

For example, in one case I want up-to-date content from production down into dev for an enhancement I'll work on. In another case I'll want to create content in dev before publishing on production. Most of the time I actually do have domain specific URLs in the content so I'll need to use a different method to migrate content between environments.

Great post!

Re: Version Controlling Wordpress

#18
How do other people keep databases in sync between multiple developers and the production server? Source code is easy. Source control and code merging are mostly straightforward.

But in something like wordpress, a lot of what gets displayed to the end user is in a database. Aside from page content, widgets and other configuration often ends up in a database. It's not unusual for themes to keep css, javascript or php in the database. (Every time I use a theme that allows me to put PHP into a database I feel like I've failed as a programmer and the gods of MVC will smite me.)

So developer X adds content to his dev copy. Developer Y adds content to his copy. Meanwhile, the client or end users are adding content to the production copy. Using a shared development/staging server somewhat mitigates this, but not totally. You can't just git merge the sql together. (Can you? I mean, sure you can merge two sql files. But is the end product actually usable?) Is this a solved problem?

Re: Version Controlling Wordpress

#19

How do other people keep databases in sync between multiple developers and the production server? Source code is easy. Source control and code merging are mostly straightforward. But in something like wordpress, a lot of what gets displayed to the end user is in a database. Aside from page content, widgets and other configuration often ends up in a database. It's not unusual for themes to keep css, javascript or php…

Maybe a database with immutable data, like datomic?
Post reply on HN