Created
August 23, 2019 19:33
-
-
Save rkmax/cce4541557a18e91c277d8bfeb4123fd to your computer and use it in GitHub Desktop.
Safe domain transition for wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set @old_domain = ''; | |
set @new_domain = ''; | |
-- Update post | |
UPDATE wp_posts | |
SET guid = replace(guid, @old_domain, @new_domain), | |
post_content = replace(post_content, @old_domain, @new_domain); | |
UPDATE wp_postmeta | |
SET meta_value = replace(meta_value, @old_domain, @new_domain); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment