Last active
August 2, 2019 09:08
-
-
Save mickaelv/45a00c82ee521672cb8c1202c99db34c to your computer and use it in GitHub Desktop.
Changer simplement l'URL dans WP depuis la BDD
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 @oldsite = 'URL', @newsite = 'URL'; | |
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, @oldsite,@newsite); | |
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite,@newsite); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment