Posted By

arnach on 10/10/10


Tagged

sql wordpress id update guid


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

arnach


Updating guid for posts and pages in Wordpress database


 / Published in: SQL
 

  1. UPDATE wp_posts
  2. SET guid = concat('http://www.example.com/?p=',ID)
  3. WHERE guid = ''
  4. AND post_status = 'publish'
  5. AND post_type = 'post';
  6.  
  7. UPDATE wp_posts
  8. SET guid = concat('http://www.example.com/?post_id=',ID)
  9. WHERE guid = ''
  10. AND post_status = 'publish'
  11. AND post_type = 'page';

Report this snippet  

You need to login to post a comment.