moving from test to a live environment with WordPress

Last updated on August 21st, 2014 at 08:21 am

After moving files from a test environment to live, still using the test environment, change the settings from http://dev.yourdomain.com to http://www.yourdomain.com

However – this doesn’t fix everything – because there are HIGHLY likely to be references in pages or posts to images/media on the old test environment – these will STOP working when you drop the dev.yourdomain.com sub-domain.

Using phpMyAdmin – you need to update the database:

update `wp_posts` set `post_content` = replace(post_content, 'dev.yourdomain.com', 'www.yourdomain.com')

next – update the `guid` entries..

update `wp_posts` set `guid` = replace(guid, 'dev.yourdomain.com', 'www.yourdomain.com')

now – update the `options` entries..

update `wp_options` set `option_value` = replace(option_value, 'dev.yourdomain.com', 'www.yourdomain.com')