Skip to content

Instantly share code, notes, and snippets.

@ph00lt0
Last active March 18, 2023 17:09
Show Gist options
  • Save ph00lt0/ac803bfa1ce9de906a8bda02f7df384f to your computer and use it in GitHub Desktop.
Save ph00lt0/ac803bfa1ce9de906a8bda02f7df384f to your computer and use it in GitHub Desktop.
Update siteurl and home WordPress SQL
UPDATE ew92_options SET option_value = replace(option_value, 'https://old-domain.example', 'https://new-domain.example') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE ew92_posts SET post_content = replace(post_content, 'https://old-domain.example', 'https://new-domain.example');
UPDATE ew92_postmeta SET meta_value = replace(meta_value,'https://old-domain.example','https://new-domain.example');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment