[wp-hackers] WP Development & Production Sites
Jeremy Clarke
jer at simianuprising.com
Fri Nov 26 18:43:58 UTC 2010
On Fri, Nov 26, 2010 at 3:37 AM, Peter van der Meij <peter at pjvdm.nl> wrote:
>
> My problem with this solution is that is you always have to find/replace
> all
> the url instances in the db.
> Because of the slightly stupid way WordPress stores it url's
>
Appologies if you are already aware of this but when using staging/dev
environments it is vital that you take advantage of the wp-config.php
constants that control the core site urls:
define('WP_SITEURL', 'http://localhost:8888/wp-svn');
define('WP_HOME', 'http://localhost:8888/wp-svn');
http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29
These won't change the urls of media links inserted in posts, but it saves
you having to find/replace the main urls in wp_options, and in my experience
dev copies work totally fine once you start using them. As long as you are
online the media files still load fine from the live site, and all wp-admin
and post links lead to the right place on your dev install.
--
Jeremy Clarke
Code and Design | globalvoicesonline.org
More information about the wp-hackers
mailing list