Created
April 7, 2015 14:33
-
-
Save bytefade/c8e28bc2209766345c0d to your computer and use it in GitHub Desktop.
Wordpress alterar urls v1
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
-- 1. Para atualizar o endereço antigo do blog para o novo endereço execute (lembre de colocar os seus dados no campo em negrito): | |
UPDATE wp_options SET option_value = replace(option_value, 'http://siteantigo.com', 'http://sitenovo.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
-- 2. O segundo passo é atualizar o endereço dos posts. Para isso, execute: | |
UPDATE wp_posts SET guid = replace(guid, 'http://siteantigo.com','http://sitenovo.com'); | |
-- 3. Agora atualize o conteúdo do blog para qualquer eventual endereço do blog nos textos. | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://siteantigo.com', 'http://sitenovo.com'); | |
-- 4. Agora atualize o conteúdo do blog para qualquer eventual endereço do blog nos textos. | |
UPDATE wp_posts SET guid = replace(guid, 'http://siteantigo.com', 'http://sitenovo.com'); | |
-- 5. Alterar wp_postmeta | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://siteantigo.com', 'http://sitenovo.com'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment