Skip to content

Document non-uniqueness of WordPress GUID #2216

@robalexdev

Description

@robalexdev

Issue Description

I noticed that WordPress documentation describes the post guid field as a "Globally Unique Identifier". Unfortunately, WordPress does not enforce a uniqueness constraint. In practice I've found posts with duplicate guid values, especially when using plugins that publish posts without going through the draft state. These tend to have GUIDs that match the fancy permalink.

URL of the Page with the Issue

Section of Page with the issue

Description

Why is this a problem?

Developers who are familiar with Microsoft GUIDs or IETF UUIDs, as commonly used on other platforms, will expect these IDs to be strictly unique. Example bugs include querying for posts by GUID and getting multiple results.

Suggested Fix

I suggest documenting that WordPress does not enforce a uniqueness constraint on the GUIDs and that multiple posts can share the same GUID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions