[wp-hackers] Keep local DB in sync with remote DB

Alex Hempton-Smith hempsworth at googlemail.com
Sat Nov 29 16:04:20 GMT 2008


Okay, I've got it working!
I remembered that localhost is always 127.0.0.1 (more coffee needed
methinks), so I have the following in my wp-config.php:

if ($_SERVER['REMOTE_ADDR'] == "127.0.0.1") {
define('WP_SITEURL', 'http://localhost/example.com/wordpress');
define('WP_HOME', 'http://localhost/example.com');
};

And it's working great, just for anybody who was thinking of doing the same.

-- Alex


On Sat, Nov 29, 2008 at 3:57 PM, Michael E. Hancock
<justmichaelh at gmail.com>wrote:

>
> ----- Original Message ----- From: "Alex Hempton-Smith" <
> hempsworth at googlemail.com>
>
>> Would this work? How would I define 'siteurl' and 'home' from inside the
>> wp-config.php?
>>
>
>  From http://codex.wordpress.org/Editing_wp-config.php
>>
>
> define('WP_SITEURL', 'http://example.com/wordpress');
> define('WP_HOME', 'http://example.com/wordpress');
>
> MichaelH
>
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list