[wp-hackers] Tips for moving a Wordpress install

Harish Narayanan harish.mlists at gmail.com
Wed Dec 2 19:51:42 UTC 2009

Mike Schinkel wrote:
> On Dec 2, 2009, at 12:35 PM, Jeremy Clarke wrote:
>> * Controlling the URL settings for the various versions is dead easy
>> using wp-config.php, just add these definitions and you will be able
>> to use backups of your live database on Dev and Stage with almost no
>> problems (you might still be pulling the media files from the actual
>> server but this rarely impedes your new development since they load
>> fine as long as you are online).
>>  define('WP_SITEURL', 'http://example.com/wordpress');
>>  define('WP_HOME', 'http://example.com/wordpress');
> There are other problems such as: 
> 1.) core and plugins that require a local path as a saved setting, 
> 2.) paths saved in serialized arrays, and 
> 3.) links in content and media that points to the development or a staging server when the data is pushed live.  
> Having something that addresses these issues by defining the different servers in the admin console to include the root url and the root path, and functions to pull the root url and root path based on a key (i.e. 'dev', 'stage' and 'live') but these should be admin configurable in case someone wants a different setup such as just dev and live or dev, stage, test and live, for example.
> For content, we could add a shortcode for [root-url] and use it instead of the hardcoded root urls.
> The solution of modifying wp-config.php is a only patch as far as I'm concerned, not a solution.  Ideally there would be three ways I can see to switch configurations:
> 1.) Via "Error" message when on the wrong server that lets the user login to the admin console in order to change
> 2.) The change could be made via HTTP POST assuming an API Key configured specific to the site instance
> 3.) In an advanced mode selected by the admin, the site could recognize where it is and switch automatically.
> Does anyone see anything my analysis misses?

I think any of these will be good ideas. Please submit some of your
ideas a patches.


> This could actually start as a plugin and then get rolled in after accepted.
> Maybe I'll work on it (no promises, I unfortunately juggle too many things.)
> -Mike Schinkel
> _______________________________________________
> 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