{"id":3058,"date":"2016-03-20T00:14:57","date_gmt":"2016-03-20T00:14:57","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=3058"},"modified":"2016-03-20T00:14:57","modified_gmt":"2016-03-20T00:14:57","slug":"change-update-wordpress-urls-database-site-moved-new-host","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2016\/03\/20\/change-update-wordpress-urls-database-site-moved-new-host\/","title":{"rendered":"Change and Update WordPress URLS in Database When Site is Moved to new Host"},"content":{"rendered":"<p>UPDATE wp_options SET option_value = replace(option_value, &#8216;http:\/\/www.oldurl&#8217;, &#8216;http:\/\/www.newurl&#8217;) WHERE option_name = &#8216;home&#8217; OR option_name = &#8216;siteurl&#8217;;<\/p>\n<p>UPDATE wp_posts SET guid = replace(guid, &#8216;http:\/\/www.oldurl&#8217;,&#8217;http:\/\/www.newurl&#8217;);<\/p>\n<p>UPDATE wp_posts SET post_content = replace(post_content, &#8216;http:\/\/www.oldurl&#8217;, &#8216;http:\/\/www.newurl&#8217;);<\/p>\n<p>UPDATE wp_postmeta SET meta_value = replace(meta_value,&#8217;http:\/\/www.oldurl&#8217;,&#8217;http:\/\/www.newurl&#8217;);<\/p>\n<p>mysql> UPDATE wp_options SET option_value = replace(option_value, &#8216;http:\/\/www.oldurl&#8217;, &#8216;http:\/\/www.newurl&#8217;) WHERE option_name = &#8216;home&#8217; OR option_name = &#8216;siteurl&#8217;;<br \/>\nQuery OK, 0 rows affected (0.00 sec)<br \/>\nRows matched: 2 Changed: 0 Warnings: 0<\/p>\n<p>mysql> UPDATE wp_posts SET guid = replace(guid, &#8216;http:\/\/www.oldurl&#8217;,&#8217;http:\/\/www.newurl&#8217;);<br \/>\nQuery OK, 0 rows affected (0.02 sec)<br \/>\nRows matched: 964 Changed: 0 Warnings: 0<\/p>\n<p>mysql> UPDATE wp_posts SET post_content = replace(post_content, &#8216;http:\/\/www.oldurl&#8217;, &#8216;http:\/\/www.newurl&#8217;);<br \/>\nQuery OK, 0 rows affected (0.05 sec)<br \/>\nRows matched: 964 Changed: 0 Warnings: 0<\/p>\n<p>mysql> UPDATE wp_postmeta SET meta_value = replace(meta_value,&#8217;http:\/\/www.oldurl&#8217;,&#8217;http:\/\/www.newurl&#8217;);g<br \/>\nQuery OK, 0 rows affected (0.01 sec)<br \/>\nRows matched: 686 Changed: 0 Warnings: 0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE wp_options SET option_value = replace(option_value, &#8216;http:\/\/www.oldurl&#8217;, &#8216;http:\/\/www.newurl&#8217;) WHERE option_name = &#8216;home&#8217; OR option_name = &#8216;siteurl&#8217;; UPDATE wp_posts SET guid = replace(guid, &#8216;http:\/\/www.oldurl&#8217;,&#8217;http:\/\/www.newurl&#8217;); UPDATE wp_posts SET post_content = replace(post_content, &#8216;http:\/\/www.oldurl&#8217;, &#8216;http:\/\/www.newurl&#8217;); UPDATE wp_postmeta SET meta_value = replace(meta_value,&#8217;http:\/\/www.oldurl&#8217;,&#8217;http:\/\/www.newurl&#8217;); mysql> UPDATE wp_options SET option_value = replace(option_value, &#8216;http:\/\/www.oldurl&#8217;, &#8216;http:\/\/www.newurl&#8217;) WHERE option_name = &#8216;home&#8217; OR option_name = &#8216;siteurl&#8217;; Query &#8230; <a title=\"Change and Update WordPress URLS in Database When Site is Moved to new Host\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2016\/03\/20\/change-update-wordpress-urls-database-site-moved-new-host\/\" aria-label=\"Read more about Change and Update WordPress URLS in Database When Site is Moved to new Host\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70,128],"tags":[],"class_list":["post-3058","post","type-post","status-publish","format-standard","hentry","category-mysql","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=3058"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3058\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=3058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=3058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=3058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}