Forked from matiasmasca/WP de desarrollo a producción
Last active
January 25, 2016 17:53
-
-
Save unabridgedxcrpt/15615def2b38bee7866c to your computer and use it in GitHub Desktop.
Move WordPress site from Development to Production
This file contains hidden or 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
-- Script to migrate WordPress database from development to production. Thanks Sergio A. Moreyra. | |
UPDATE wp_options | |
SET option_value = replace(option_value,'http://www.TuSitio.com/desarrollo', 'http://www.TuSitio.com') | |
WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts | |
SET guid = REPLACE (guid, 'http://www.TuSitio.com/desarrollo', 'http://www.TuSitio.com/'); | |
UPDATE wp_posts | |
SET post_content = REPLACE (post_content, 'http://www.TuSitio.com/desarrollo', 'http://www.TuSitio.com'); | |
UPDATE wp_posts | |
SET post_content = REPLACE (post_content, 'src=" http://www.TuSitio.com/desarrollo/', 'src=" http://www.TuSitio.com/'); | |
UPDATE wp_posts | |
SET guid = REPLACE (guid, 'http://www.TuSitio.com/desarrollo', 'http://www.TuSitio.com') | |
WHERE post_type = 'attachment'; | |
UPDATE wp_postmeta | |
SET meta_value = REPLACE (meta_value, 'http://www.TuSitio.com/desarrollo','http://www.TuSitio.com'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment