{"id":549,"date":"2013-08-30T05:06:09","date_gmt":"2013-08-30T05:06:09","guid":{"rendered":"http:\/\/cruz.codecharismatic.com\/?p=549"},"modified":"2014-07-04T22:50:32","modified_gmt":"2014-07-04T22:50:32","slug":"wordpress-how-to-update-site-url-and-home-url-using-sql","status":"publish","type":"post","link":"https:\/\/codecharismatic.com\/wordpress-how-to-update-site-url-and-home-url-using-sql\/","title":{"rendered":"WordPress: How To Update Site URL And Home URL Using SQL"},"content":{"rendered":"
I do this often enough. You think it’d be committed to memory by now. Alas, my memory doesn’t need to be bothered with things like this. That’s what my blog is for.<\/em> So here blog, remember this.<\/p>\n I also, like the safe version of this, you know, just to see what is already in there. Or what you updated it with.<\/p>\n\nUPDATE wp_options SET option_value = replace(option_value, 'http:\/\/www.oldurl', 'http:\/\/www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';\n<\/pre>\n
\nselect * from wp_options WHERE option_name = 'home' OR option_name = 'siteurl';\n<\/pre>\n