Automatic redirects ability reference
Reference for the GoBuildWP Pro 1.12.4 source. Installed schemas and policy remain authoritative.
This automatic redirects ability reference covers behaviour built into GoBuildWP Pro rather than tied to one plugin: when a published post's address changes, Pro creates a 301 from the old address in whichever redirect store the site has. The two abilities report what it did and switch it on or off.
Read-only, write and destructive groups describe the source annotations. They do not establish a minimum safety profile, human approval or undo support. Those controls are separate: check the installed ability, the connected user and the active site policy before calling it. A read can still return sensitive data. These pages are not evidence that every operation passed an end-to-end runtime test.
What Automatic redirects needs before these load
No companion plugin is needed for the module to register, but where each redirect is stored depends on what is installed. The stores are tried in a fixed order: Redirection, Rank Math, Yoast SEO Premium, All in One SEO Pro, then SEOPress Pro. Rank Math counts only when its redirections are actually being served, which is not the case before its setup wizard is finished. With none of them available, WordPress's own old-slug handling is the only cover. Both calls need manage_options.
- Automatic redirects editions
- pro
- Agent skills shipped
redirects
When a redirect is created
The hook runs on every save that goes through wp_update_post: the block editor, the REST API, WP-CLI and Pro's own abilities alike. It acts only when a post was published before the save and is still published after it, on post types that are publicly viewable and are not attachments; autosaves and revisions are ignored. A changed slug and a changed parent both count, and when a page moves, up to 50 of its published descendants get redirects of their own, because their addresses moved with it.
It runs late on purpose, after Redirection's own monitor and Rank Math's automatic post redirect have had their turn. If one of them already created the same redirect, GoBuildWP records it as existing instead of adding a second.
Loops, chains and other people's redirects
Before creating anything it removes a redirect whose source is the new address, which is what renaming A to B and back to A would otherwise leave behind, and it repoints redirects that target the old address so a visitor takes one hop rather than two. Both repairs apply only to redirects GoBuildWP created for the same post, tracked in the wppilot_pro_auto_redirect_owned option (up to 2,000 entries). A hand-made redirect is never removed or repointed; it is reported as a conflict for a person to decide.
Reading redirects-status
Turning monitoring off does not delete provider redirects already created; deleting records is separate owner-reviewed work. The result names the active provider, lists every provider with whether it is available and whether its own slug-change watcher is on, and returns the most recent automatic redirects (20 by default, up to 50; the log keeps 50). Each entry has an action: created, exists (an enabled redirect to the same place was already there), disabled (one exists but is switched off, so the old address still fails), conflict (the old address already goes somewhere else), core (no redirect plugin, but WordPress's old-slug redirect covers a post's slug change), uncovered (no redirect plugin and nothing covers a page or parent move, so the old address will return 404) or error.
Representative call sequence
This sequence describes the documented calls and checks to perform. It is not a recorded result from an installed WordPress site. Inspect returned errors and partial results, then verify the saved values and affected output before proceeding.
Shorten a page's slug on a site running Rank Math, and check that the old address still reaches it.
- 01
wppilot/redirects-statusConfirms automatic redirects are on and that Rank Math is the active provider, not merely installed. - 02
wppilot/update-postChanges the page's slug. The save itself triggers the redirect; there is no separate call to make. - 03
wppilot/redirects-statusShows the newest entry for that post. created or exists is the result you want; conflict or uncovered means a person has to act in the redirect plugin. The log records what was stored, not what is served: request the old address from outside the site (for example with curl -I) and check for a 301 whose Location is the new address, because a page cache or a server rule can still answer first.
Questions about Automatic redirects
Does switching automatic redirects off delete the redirects already made?
No. wppilot/redirects-set-auto only changes the wppilot_pro_auto_redirects option, which is on by default. Redirects already created stay in Redirection, Rank Math or whichever plugin stores them, and are managed there. The switch is recorded in the change ledger, so wppilot/rollback-change turns it back.
What happens on a site with no redirect plugin?
WordPress itself remembers a post's old slug and redirects it, so a renamed blog post keeps working. Pages and parent moves are not covered by that mechanism, and the status call reports those as uncovered: the old address will 404 until a redirect plugin such as Redirection is installed or Rank Math's redirections are enabled.
Automatic redirects reads
| Ability | What it does |
|---|---|
wppilot/redirects-statusRedirect Status | Reports how this site handles a changed permalink: whether GoBuildWP's automatic slug-change redirects are on, which redirect store they go to (first available of Redirection, Rank Math, Yoast SEO Premium, All in One SEO Pro, SEOPress Pro; otherwise only WordPress's own _wp_old_slug fallback, which does not cover pages or parent changes), whether that plugin also watches slug changes itself, and the most recent automatic redirects with what each one did (created, exists, disabled, conflict, core, uncovered, error) - including redirect loops removed and chains collapsed, and in conflicts any loop or chain left alone because GoBuildWP did not create that redirect. |
Automatic redirects writes
| Ability | What it does |
|---|---|
wppilot/redirects-set-autoTurn Automatic Redirects On or Off | Switches GoBuildWP's automatic 301 on permalink change on or off for the whole site (option wppilot_pro_auto_redirects, on by default). Reversible with wppilot/rollback-change. |