Question

How significant is the guid field in wp_posts?

I'm doing a migration and adding a lot of images to the table (via wp_insert_attachment, wp_generate_attachment_metadata and wp_update_attachment_metadata), but the guid field isn't filled by default.

Should i correct this?

Was it helpful?

Solution

If you want to offer an ATOM feed for your attachments you should pass a GUID to wp_insert_attachment() or add a filter for 'get_the_guid' that handles empty values. In most (all?) other cases I wouldn’t care about it.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top