Last active
December 20, 2017 21:56
-
-
Save bpardo/43a9bfe1d018a15a2049a6415a73ebe8 to your computer and use it in GitHub Desktop.
Deplacer un blog 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
# Changer l'URL du site | |
UPDATE wp_options | |
SET option_value = replace(option_value, 'http://www.ancien-site.com', 'http://www.nouveau-site.com') | |
WHERE option_name = 'home' | |
OR option_name = 'siteurl'; | |
# Changer l'URL des GUID | |
UPDATE wp_posts | |
SET guid = REPLACE (guid, 'http://www.ancien-site.fr', 'http://www.nouveau-site.fr'); | |
# Changer l'URL des médias dans les articles et pages | |
UPDATE wp_posts | |
SET post_content = REPLACE (post_content, 'http://www.ancien-site.fr', 'http://www.nouveau-site.fr'); | |
# Changer l'URL des données meta | |
UPDATE wp_postmeta | |
SET meta_value = REPLACE (meta_value, 'http://www.ancien-site.com','http://www.nouveau-site.com'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment