Change host DB URL Update WordPress ( No Plugins )

updatewpurls

Do you want to update URLs after moving your WordPress site? It can be quite painful to manually edit each post or page just to replace old URLs. In this article, we will show you how to easily update URLs when moving your WordPress site.

Step 1 :  Login to your database

Step 2 : Select database -> SQL

Step 3 : Copy code below and

+ replace yourprefix_ to your database prefix

+ http://old-domain.com to your old domain

+ http://new-domain.com to your new domain

UPDATE `yourprefix_options`
SET option_value = REPLACE(option_value, 'http://old-domain.com', 'http://new-domain.com');


UPDATE `yourprefix_postmeta`
SET meta_value = REPLACE(meta_value, 'http://old-domain.com', 'http://new-domain.com');


UPDATE `yourprefix_posts`
SET post_content = REPLACE(post_content, 'http://old-domain.com', 'http://new-domain.com');


UPDATE `yourprefix_posts`
SET guid = REPLACE(guid, 'http://old-domain.com', 'http://new-domain.com');

0938.54.84.99