[wp-hackers] Keep local DB in sync with remote DB
Stephen Rider
wp-hackers at striderweb.com
Sat Nov 29 19:44:11 GMT 2008
I actually have my local server set up so it uses example.local
instead of example.com. In wp-config.php I set WP_SITEURL etc., and I
keep the wp-config.php one directory up from the WordPress files. The
local and "live" wp-config files aren't synced, but everything else
is. Works perfectly for me. No extra code needed.
On another note: I keep my wp-content in a separate place too, so when
upgrading I can completely wipe the wp/ directory and upload the new
files.
Stephen
On Nov 29, 2008, at 9:53 AM, Alex Hempton-Smith wrote:
> Okay, silly me should have looked in the codex first, so I can
> override the
> options in the DB by adding this:
> define('WP_SITEURL', 'http://localhost/mysite.com/wordpress');
> define('WP_HOME', 'http://localhost/mysite.com');
>
> But the if statement I posted earlier, to check if the client IP
> matches the
> server IP doesn't seem to work; any ideas how I can define these if
> I am
> browsing the site from localhost?
--
Stephen Rider
<http://striderweb.com/>
More information about the wp-hackers
mailing list