Last active
November 25, 2015 20:24
-
-
Save gregoirenoyelle/2419465 to your computer and use it in GitHub Desktop.
WordPress SQL
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
## Coller la totalite dans champs SQL de phpMyAdmin ## | |
## ATTENTION A NE PAS METTRE DE SLASH A LA FIN DES URL ## | |
# CHANGER URL DU SITE | |
UPDATE wp_options | |
SET option_value = REPLACE(option_value, 'http://www.vieuxsite.fr', 'http://www.nouveausite.fr') | |
WHERE option_name = 'home' | |
OR option_name = 'siteurl'; | |
# CHANGER URL DES GUID (GLOBAL UNIQUE IDENTIFIER) | |
UPDATE wp_posts | |
SET guid = REPLACE(guid, 'http://www.vieuxsite.fr', 'http://www.nouveausite.fr'); | |
# CHANGER LES URL DES CONTENUS DES ARTICLES | |
# (LIEN, IMAGE, DOCUMENT) | |
UPDATE wp_posts | |
SET post_content = REPLACE(post_content, 'http://www.vieuxsite.fr', 'http://www.nouveausite.fr'); | |
# CHANGER LES URL DES DONNEES META DES POSTS | |
UPDATE wp_postmeta | |
SET meta_value = REPLACE(meta_value, 'http://www.vieuxsite.fr','http://www.nouveausite.fr'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice !