- May 22, 2016
- Posted by: Admin
- Category: Wordpress
Here, We have written an article about MySQL Query for Moving WordPress Website from Local Server to Live Server. So it will replace url from local url to live server url. It helps you to move local server to live server easily without manually change any url. It also helps you when you move one server to another server with different domain name.
Here you find the query for it. In that, you have to write oldsite url means local server url and newsite url.
UPDATE wp_options SET option_value = REPLACE(option_value, 'oldsite.com', 'newsite.com');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'oldsite.com', 'newsite.com');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'oldsite.com', 'newsite.com');
UPDATE wp_posts SET post_excerpt = REPLACE(post_excerpt, 'oldsite.com', 'newsite.com');
UPDATE wp_posts SET guid = REPLACE(guid, 'oldsite.com', 'newsite.com');
Let us know if you have any issue to move your wordpress website from your local server or development server to live server. Thanks!