Forked from hawkapparel/SCRIPT PARA CAMBIAR URLS EN WORDPRESS
Last active
April 24, 2018 14:59
-
-
Save jadark/bc776f57ba82d243f765daf75015c4b6 to your computer and use it in GitHub Desktop.
SCRIPT PARA CAMBIAR URLS EN WORDPRESS || Con este script se actualiza las urls de la BD cuando se cambia de servidor un proyecto 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
-- UPDATE wp_posts SET guid = replace(guid, 'URL_ACTUAL','URL_A_USAR'); | |
UPDATE wp_posts SET guid = replace(guid, 'http://tuurldeproduccion.com.pe/','http://localhost/tuproyecto'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://tuurldeproduccion.com.pe/', 'http://localhost/tuproyecto'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://tuurldeproduccion.com.pe/', 'http://localhost/tuproyecto'); | |
UPDATE wp_options SET option_value = replace(option_value, 'http://tuurldeproduccion.com.pe/', 'http://localhost/tuproyecto') | |
WHERE option_name = 'home' OR option_name = 'siteurl'; | |
-- UPDATEEEEEEEEEEEE!!!!!!!!! | |
UPDATE wp_options SET option_value = replace(option_value, 'https://www.bellezaadomicilio.com.pe', 'http://127.0.0.1:7000') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'https://www.bellezaadomicilio.com.pe','http://127.0.0.1:7000'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'https://www.bellezaadomicilio.com.pe', 'http://127.0.0.1:7000'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://www.bellezaadomicilio.com.pe','http://127.0.0.1:7000'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment