2

WordPress' "preview" mode is good, but not perfect.

How can I create a "staging site", where I can make changes, and then, when I'm satisfied, mirror the changes to my production site?

I realize this isn't trivial (eg, copying tables from staging to production would wipe out comments created in the interim), but seems do-able.

I know about http://mattheworiordan.com/projects/wp-plugins/dev-staging-environment/ but this assumes you've already setup a dev and staging environment.

4
  • Are you making changes to content, or just to extensions (e.g. Theme, Plugins)? Commented Jun 10, 2011 at 16:49
  • Usually just to content, but sometimes to themes, categories, etc. I want to make the staging site as general as possible.
    – user4849
    Commented Jun 10, 2011 at 16:51
  • For metadata, I would suggest that this isn't a very tenable workflow. Your taxonomies, etc. should be determined before creating content, and should be changed only in a deliberate manner. If you're constantly making taxonomy changes that require using a development site, you might want to re-think your overall handling and use of taxonomies. Commented Jun 10, 2011 at 16:57
  • For Post content: what is wrong with the "Preview" functionality, that doesn't meet your needs? Maybe there's a better way to work around whatever problems or limitations you're running into, that would preclude the need to mirror content? Commented Jun 10, 2011 at 16:58

1 Answer 1

1

I just set up a dev.domain.com subdomain and mirror everything there, doing a find/replace on the sql export for www > dev, and of course changing wp-config.

I used to have a staging server I mirrored things on, but I've since learned that a change in length of the domain name will invalidate any serialized data that contains it, so I now always keep the staging domain the same length as the live domain.

You could also not sync the comments table so you don't overwrite interim comments, as long as post IDs don't change I don't think this should be an issue.

Your Answer

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