How To Easily Update Your WordPress URL After A Server Move

To convert FROM dev TO www:
1 2 3 4 5 |
use yourDatabase; UPDATE wp_options SET option_value = REPLACE(option_value, 'dev.yourdomain.com', 'www.yourdomain.com'); UPDATE wp_posts SET post_content = REPLACE(post_content, 'dev.yourdomain.com', 'www.yourdomain.com'); UPDATE wp_posts SET guid = REPLACE(guid, 'dev.yourdomain.com', 'www.yourdomain.com'); UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'dev.yourdomain.com', 'www.yourdomain.com'); |
To convert FROM www TO dev:
1 2 3 4 |
UPDATE wp_options SET option_value = REPLACE(option_value, 'www.yourdomain.com', 'dev.yourdomain.com'); UPDATE wp_posts SET post_content = REPLACE(post_content, 'www.yourdomain.com', 'dev.yourdomain.com'); UPDATE wp_posts SET guid = REPLACE(guid, 'www.yourdomain.com', 'dev.yourdomain.com'); UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'www.yourdomain.com', 'dev.yourdomain.com'); |
Leave Your Comment
All fields marked with "*" are required.