These tips and tools are “hacks” for editing WordPress database — not dealing with a hacked WordPress site or database. If your site was breached, please contact us and we can fix it for you!
Did you migrate a WordPress site without changing the URL setting first? No worries! You can edit this in the database directly!
Changing Canonical URL:
UPDATE wp_options SET option_value = replace(option_value, 'old.url', 'new.url') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'old.url','new.url');
UPDATE wp_posts SET post_content = replace(post_content, 'old.url', 'new.url');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'old.url','new.url');
See our previous article about how to insert a WordPress Admin User as well.