Skip to content

Instantly share code, notes, and snippets.

@maksimerohin
Last active May 24, 2022 13:07
Show Gist options
  • Save maksimerohin/69a5f2cf487bfa0ce3a67ee100889696 to your computer and use it in GitHub Desktop.
Save maksimerohin/69a5f2cf487bfa0ce3a67ee100889696 to your computer and use it in GitHub Desktop.

UPDATE wp_options SET option_value = replace(option_value, 'old_value', 'new_value') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'old_value','new_value');
UPDATE wp_posts SET post_content = replace(post_content, 'old_value', 'new_value');

UPDATE wp_options SET option_value = replace(option_value, 'http://sam136f4.beget.tech', 'https://mag-rf.ru/') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://sam136f4.beget.tech','https://mag-rf.ru/');
UPDATE wp_posts SET post_content = replace(post_content, 'http://sam136f4.beget.tech', 'https://mag-rf.ru/');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment