用 SQL 语句修改 WordPress 文章和博客链接

修改文章中的链接

UPDATE wp_posts SET post_content = REPLACE(post_content, 'oldvalue', 'newvalue');

修改博客地址

UPDATE wp_options SET option_value = REPLACE(option_value, 'oldvalue', 'newvalue') WHERE option_name='siteurl';
UPDATE wp_options SET option_value = REPLACE(option_value, 'oldvalue', 'newvalue') WHERE option_name='home';

Over!

Leave a Reply

Your email address will not be published. Required fields are marked *