[wp-testers] $post data's GUID

Brian Layman bulk at thecodecave.com
Wed May 19 23:25:23 UTC 2010

>The ID is supposed to be unique and permanent (and hence why we used the
URL, as
>that's simple).

Simple... but not really.  When you take into consideration things like
changing permalink structures, swapping post urls ("/About-New/" for an old
"/About/"), post revisions, importing and aggregation with older php
versions, you see why this issue comes up regularly. 

There's even a 3.1 ticket that's been hanging around for a couple years.

The simple rule is don't rely on the content of the guid field for anything
beyond its uniqueness. In fact you'll be much happier in life if you never
ever look the content of that field. Ignore its value completely and simply
presume, for the purpose of a running site, that said value is arbitrarily
unique. :)
-Brian layman

More information about the wp-testers mailing list