Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Currently i use a dump script and commit the database to the git repo. --skip-extended-insert --skip-comments --skip-dump-date means that a diff can give me a fair idea of what has changed, but it all falls down if I try to merge.

The WP_SITEURL, WP_HOME and all the other places wordpress stores full URLs need updating when importing to another host (testing,staging,production)

Is anyone using a better method?

Main issues:

  • Wordpress stores full URLs all through the database (non-portable)
  • Lots of other, non-relevant records change
    • auto_increment values (i just strip these out, but have run into ID issues)
    • timestamps (can also strip out, potentially)
    • transient* records ... no idea what to do with them

A process that created timestamped migrations, with only the things added or removed, would be ideal... but i'm not sure if it's even possible?

share|improve this question
    
Do you want to version all data changes or only changes in structure? and that is your real BUSINESS-TASK? –  Lazy Badger Feb 14 at 6:31
    
When making changes to CMS's like wordpress, there are often content and configuration (DB data) changes along with logic (code) changes. I would like to be able to version both. Structure changes would be a good start ... BUSINESS TASK: client asks for new widget. Install plugin on staging server, commit to repo -> Configure plugin and add sample content -> once approved, pull code changes to production, then manually make same data changes in production admin. –  Jacob Dorman Mar 1 at 0:27
1  
@JacobDorman I'm trying to solve this exact same problem. Have you worked something out yet? After some research I'm starting to think some custom plugin that creates a specific update script is in order (probably to export only configuration changes such as installed plugins, and configuration options -- and not necessarily posts, categories, and content in general). Would love to hear if you have any other ideas. –  Victor Sep 9 at 0:43

1 Answer 1

up vote 1 down vote accepted

Here are two possible solutions, both of these are actually generic MySQL version control tools but can be adapted to your workflow:

dbv.php

This tool creates "migrations", which are basically SQL scripts, from the changes detected on the database. These scripts are stored in a local directory and thus can be commited to your current VCS (git, for example).

It's used through a PHP web interface.

DBVC

Fundamentally similar to the previous tool, this is based on a command line interface. It's configured through a json file. The main difference is that it doesn't auto-generate the migration files.

There's a pending issue to integrate this with the previous similar, so that's something to look for.

Wordpress Plugins

Some plugins that could aid in the creation of a repeatable workflow:

share|improve this answer
    
dbvc looks like the kind of tool I've been looking for. thanks! –  Jacob Dorman Sep 11 at 7:31
1  
I'm glad it helped. I just found another interesting tool,it hasn't been updated in a while, but it might be worth to take a loot at: github.com/idler/MMP –  Victor Sep 11 at 15:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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