By Redlist

2011-03-08 17:33:54 8 Comments

This is a more general question about WP website best practices.

An issue I encounter with many of my clients is maintaining two identical WP installs (staging and production). They insist on seeing changes before they go live. However, with WP's structure, that would involve constantly clearing and re-importing databases in addition to updating theme files.

Is there a simple answer out there that would allow me to maintain two identical WP websites with as few headaches as possible?

Thank you in advance for your help! Jake


@Daniel Huckson 2015-01-23 06:16:17

Hello this was something I needed to do as well, only I wanted it automated.

I wanted a mirror of domain to

This mirror needed to be fully functional, so that means all the URL's need to be changed from to in the database.

This needs to be done so that all the links and internal URLs point to on the mirrored domain.

All uploaded data needed to be synchronized from to

What I did was create three scripts to do just that for me and I never need to worry about it, it's self maintained!

This software is free open source and available on Github.

Here is a post on the process used to Automating the Mirroring of WordPress to Another Domain

@kaiser 2015-01-23 07:18:47

Answers should be more than plain links. They should actually be an answer instead of a route where someone will maybe find an answer. Please help preventing link rot, edit your answer and provide the needed information that helps the OP as well as later visitors to solve their problem. Btw, all links here are nofollow.

@jnhghy - Alexandru Jantea 2016-11-14 16:25:36

Link is broken, from my point of view mirroring doesn't solve data updates while developing issues.

@Eric C 2012-10-21 23:14:06

I found this article on WPtuts informative:

How to Sync A Local & Remote WordPress Blog Using Version Control

@fuxia 2012-10-22 00:08:41

@jnhghy - Alexandru Jantea 2016-11-14 16:22:58

Sorry to say but that article covers only files, for the db it only shows how to copy the production db to the stage server and they clearly state they don't have a solution for db updates while work is in progress. Still looking for a solution

@Dougal Campbell 2011-03-08 19:19:40

You might be interested in this Q/A in the FAQ category:

How to: Easily Move a WordPress Install from Development to Production?

Server mirroring/migration is a pain because there are so many pieces that might (or might not) need to be synced. PHP code (core, plugins, themes) is easy enough to keep straight. But when it comes to data, it gets messier. You've got your content, user accounts, and lots of option settings. Some of which will come from your plugins and themes, and which are typically not namespaced in any way that lets us manage them well. Plus, some of the options are 'hardcoded' to your hostname/URL, and internal links (such as for media) are hardcoded based on the configured URL, as well.

I keep hoping that over time, we'll come up with some changes to core that will help mitigate at least some of these issues.

@Dalton Rooney 2011-03-10 19:09:14

Thanks, there's a good bit of information in that other post!

Related Questions

Sponsored Content

2 Answered Questions

Syncing production with staging

3 Answered Questions

[SOLVED] Ways of managing staging and production wordpress sites?

2 Answered Questions

[SOLVED] Different color admin bars for dev, staging and production

2 Answered Questions

4 Answered Questions

1 Answered Questions

[SOLVED] Theme/Plugin/Widget Data and Staging/Production Servers

3 Answered Questions

2 Answered Questions

[SOLVED] Graphic design changes on Staging before moving to Production?

Sponsored Content