Return to Snippet

Revision: 33572
at October 10, 2010 21:04 by arnach


Initial Code
update wp_posts
set guid = concat('http://www.example.com/?p=',ID)
where guid = ''
and post_status = 'publish'
and post_type = 'post';

update wp_posts
set guid = concat('http://www.example.com/?post_id=',ID)
where guid = ''
and post_status = 'publish'
and post_type = 'page';

Initial URL

                                

Initial Description

                                

Initial Title
Updating guid for posts and pages in Wordpress database

Initial Tags
sql, wordpress, update

Initial Language
SQL