WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Are you making changes to content, or just to extensions (e.g. Theme, Plugins)? – Chip Bennett Jun 10 '11 at 16:49
Usually just to content, but sometimes to themes, categories, etc. I want to make the staging site as general as possible. – barrycarter Jun 10 '11 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. – Chip Bennett Jun 10 '11 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? – Chip Bennett Jun 10 '11 at 16:58

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.

share|improve this answer

Your Answer


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.