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.

I have a WordPress site under local version control with Git. I deploy it to the production server using Capistrano.

For the initial deployment, I manually import the SQL database to the production server, and change all the local references by hand. Any content changes are made on the production server from then on.

This is for the most part okay, but I'm having a problem when it comes to testing/configuring new or updated plugins, since many plugins make changes to the wp_options table. I need a way to add/remove/update/configure plugins locally, do all my testing and then seamlessly deploy the updated site to the production server without breaking anything.

How are others dealing with this?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Not very well. There are issues with not only WordPress but plugins in general when moving databases on the fly, as for as I know, there is no seemless (or effortless) way to do this, it's hacky at best, for that reason most people still use database dumps.

If you just care about preserving db urls, you can mimic the live url on your localhost machine using a vhost file.

If you want to preserve all data (id's, content, and such) then you can sync the databases, just use precaution or a staging server as this can cause a disaster if a local change or mistake is made. This is not common because any local database stored changes will effect the live site's database, so it's really only good for altering code.

The alternatives would be a combination of the above with a server script that automates the migrations and sifts through the db, there are a few on github and elsewhere.

Some helpful links:

I also believe there are some 3rd party services (hosts) that now do this.

share|improve this answer

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.