Search & Replace
What Is a GUID in WordPress (and When to Replace It)
A WordPress GUID is a unique identifier stored in the wp_posts.guid column for every post, page, and attachment — and although it usually looks like a URL, it is not one. The short answer to "should I replace my GUIDs?" is almost always no: WordPress treats the GUID as a permanent feed identifier, and changing it can make old content resurface as new in RSS readers. This page explains what a GUID is, the rare cases where replacing it is appropriate, and how to do it with Update URLs if you must.
What is a GUID in WordPress?
A GUID (Globally Unique Identifier) is a string WordPress assigns to each piece of content when it is first created, stored in the guid column of the wp_posts table. For a post it typically looks like:
https://example.com/?p=123
Despite the https:// prefix, the GUID is an identity, not an address. Its job is to be globally unique and permanent, so external systems can recognize a specific item over time.
Why a GUID is not a URL
The GUID looks like a link, but you should not treat it as one:
- It is not a live, clickable link to the content.
- It is a stable unique identifier, assigned once and meant never to change.
- It is used mainly by RSS/Atom feed readers to tell whether an item is new or already seen.
Because feed readers key off the GUID, its value matters far more as a constant than as a working address.
Why WordPress warns against changing GUIDs
The official WordPress guidance is direct: do not change GUIDs after content is published. Feed readers compare GUIDs to decide what is new, so if you rewrite them:
- Previously delivered posts can appear as brand-new items in subscribers' feeds.
- Readers may show duplicate posts.
- Content can look re-published even though you only changed a stored string.
For a normal live site, the cost of changing GUIDs is real and the benefit is usually zero.
When is it appropriate to replace GUIDs?
Replacing GUIDs is safe only in controlled situations where no external system has consumed the old identifiers. Use this table as a quick rule of thumb:
| Scenario | Replace GUIDs? |
|---|---|
| Local → live, site was never public | Yes |
| Staging → production, private until launch | Yes |
| Cloning a site into a new, independent website | Yes |
| Live site domain change | No |
| HTTP → HTTPS migration on a live site | No |
| Permalink or SEO URL restructure | No |
The common thread for "Yes": the old GUIDs were never exposed to real subscribers or search engines, so nothing external depends on them. The common thread for "No": the site is public, indexed, or has feed subscribers, so the GUIDs are load-bearing identifiers.
The one common exception: attachment GUIDs on a domain migration
Attachments are the practical exception. The guid of an attachment (post_type = attachment) is used by parts of WordPress to build media URLs, so on a genuine domain move it can be appropriate to update attachment GUIDs while leaving post and page GUIDs alone. Update URLs handles this: its Attachments target rewrites wp_posts.guid only for attachments, separately from the general Replace GUIDs option that touches all GUIDs. Prefer the narrower Attachments target when it's only media URLs you need to move.
How to replace GUIDs with Update URLs
If your situation is genuinely one of the "Yes" cases, Update URLs can rewrite the guid column as part of a search and replace.
Free version
- Go to Update URLS → Search & Replace.
- Enter the old string in Search For and the new one in Replace With.
- Under Additional Settings, tick Replace GUIDs.
- Run the replace. The change is immediate and cannot be undone in the free version, so back up your database first.
PRO version
- Go to Update URLS → Search & Replace.
- Enter your search and replace values and select your tables.
- Turn on the Replace GUIDs toggle under Additional Settings.
- Keep Run as dry run on to preview which GUID rows would change, review them, then apply.
- If the result is wrong, reverse it from Update URLS → History with Undo.
Replace GUIDs is off by default — leave it off unless you're sure
Both the free Replace GUIDs checkbox and the PRO Replace GUIDs toggle default to off, on purpose. Enable it only in a controlled, non-public migration or a site clone. For live-site domain moves, HTTP→HTTPS, or permalink changes, leave GUIDs untouched.
For live sites, do this instead
When your site is public, changing URLs the right way does not involve GUIDs:
- Use proper 301 redirects for changed URLs.
- Update the
siteurlandhomeoptions to the new domain. - Run search and replace on safe fields such as post content and custom fields, and leave GUIDs off.
A useful mental model: the GUID is a permanent identity, while the permalink is the current address. You can change an address; you should not change an identity that other systems have already recorded.
Conclusion
For almost every live site, the correct action is to leave GUIDs exactly as they are — they are feed identifiers, not URLs, and rewriting them can flood subscribers with duplicate content. Replace GUIDs only in controlled cases: a site that was never public, a staging-to-production launch, or a clone, with attachment GUIDs the main exception on a real domain move. When you do, use the Replace GUIDs checkbox (free) or toggle (PRO), and in PRO preview the change with a dry run first. See how to do search and replace text in WordPress for the general workflow.
FAQs
What is a GUID in WordPress?
A GUID (Globally Unique Identifier) is a unique string WordPress stores in the wp_posts.guid column for every post, page, and attachment when it is created. It usually looks like a URL, such as https://example.com/?p=123, but it functions as a permanent identity rather than a live link. Feed readers use it to tell whether an item is new or already seen.
Should I change GUIDs when I migrate my site to a new domain?
Generally no. If the site is public, indexed, or has feed subscribers, leave post and page GUIDs unchanged, because rewriting them can make old posts reappear as new in RSS readers. Instead, set up 301 redirects, update the siteurl and home options, and search-replace content fields. Attachment GUIDs are the exception you may update on a genuine domain move.
How do I replace GUIDs in Update URLs?
Open Update URLS → Search & Replace, enter your search and replace values, and enable Replace GUIDs — a checkbox in the free version, a toggle in PRO. Both are off by default. In PRO, keep the dry run on to preview the affected GUID rows before applying, and use History → Undo to reverse the run. In the free version, back up first, as the change is immediate and irreversible.
Is the GUID the same as the permalink?
No. The permalink is the address people use to reach your content and can change when you adjust your permalink structure. The GUID is a fixed identifier assigned once and meant to stay constant, used by feed readers to recognize content. Changing a permalink is normal; changing a GUID on a live site is discouraged because external systems rely on it.
Why does the GUID look like a URL if it isn't one?
Early WordPress used a URL-shaped string as a convenient way to generate globally unique values, and that format stuck. The https:// prefix is historical, not functional — the GUID is never resolved as a working link for identity purposes. That appearance is exactly why people are tempted to "fix" GUIDs during migrations, and why WordPress warns against it.