[wp-hackers] Using Live Database with Development environment

"Matthias P. Würfl" mpw at taquiri.de
Fri Mar 2 11:56:28 UTC 2012

Am 02.03.2012 12:04, schrieb Kokarn:
> Trying to build a development environment based on git that works with
> multiple wordpress installations.
> The problems we are facing right now is that some things we do in the
> database data and some we do in the structure.
> When we then try to push the changes we need to figure out a good way to
> prioritize what changes to be made and stuff like that.

We use svn and figured out how to cope with the file changes. The 
solution is to handle [A] 3rd-party code (Wordpress), [B] own code and 
site-configuration (Theme), [C] Data and [D] host-dependent 
configuration different. This can be done, because these four 
"file-classes" can live in seperate directories.

Because with the database changes it isn't as simple as with the files 
we store the most relevant parts of the configuration in files (i.e. 
Database conn, Base URLs and directory names). Every host knows the 
configuration of each other host and replaces URLs pointing to other 
hosts on the fly with own URLs with an output_buffer. The Hosts knows 
which files to use by comparing their names with HTTP_Host.

Our remaining problem is changes to the host-independent Configuration 
(i.e. theme options) in db. We can't just copy the DB from live to dev, 
check it and copy it back because we would lose changes made to live in 
the meantime. We can't use the live-DB on the dev machines beacause the 
whole purpose of dev and staging is that changes are checked before the 
go live.

Grüße, Matthias

More information about the wp-hackers mailing list