[wp-hackers] updating guid when changing permalinks

Ryan Boren ryan at boren.nu
Wed Jul 5 01:17:00 GMT 2006


Sam Angove wrote:
> On 7/5/06, John Joseph Bachir <jjb at ibiblio.org> wrote:
>>
>> I just realize that Lyceum does not update posts' GUIDs when changing the
>> blog slug. This must be done when permalinks are update... but I can't
>> seem to hunt down where WordPress takes care of this. Can someone 
>> point me
>> in the right direction?
> 
> WordPress uses the permalink as the GUID, but any unique identifier
> would do. A post's GUID should never change.
> 
> That it stops every post from being seen as "new" by RSS readers when
> the permalink structure changes is the most practical reason why.

Right. We don't change the GUID on published posts even if the slug 
changes.  The code is in wp_insert_post().

Ryan


More information about the wp-hackers mailing list