Updating guid for posts and pages in Wordpress database


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.