Skip to content

Migration Backup and Recovery

Job van Koeveringe edited this page Nov 2, 2026 · 4 revisions

Migration, Backup and Recovery

Use this runbook when moving the site, changing its public URL, changing a reverse proxy, restoring a backup, or rotating OIDC credentials.

Before a planned change

  1. Record the current public WordPress home URL, redirect URI, post-logout redirect URI, provider scopes, and allowed organizations.
  2. Back up the WordPress database and the active plugin directory using the site's established backup process.
  3. Export or preserve logs only when required by the site's retention policy; they can contain personal data.
  4. Record the current Site Health results and the next scheduled log cleanup.
  5. Ensure at least one administrator can use the normal WordPress username/password login as a recovery route.
  6. Plan a verified SOL login with a non-administrator test account after the change.
  7. Record SOL role-mapping rules, the additional-default-role setting, the WordPress default role, provider roles scope, and any WooCommerce SOL Access restrictions.

Back up the five SOL role-data tables, mapping settings, managed-role user metadata, and product restriction metadata along with the rest of the WordPress database. The role graph is not a live directory that can be fully rebuilt just by opening the Role Explorer.

Never put the Client Secret, tokens, authorization codes, or session cookie data into migration tickets, deployment logs, or public support requests.

Changing the public URL or domain

The redirect URI is the WordPress home URL with a trailing slash. After a domain, scheme, path, port, or canonical-host change:

  1. Update WordPress home and siteurl according to the normal WordPress migration procedure.
  2. Update both the Redirect URI and Post Logout Redirect URI in the managed website connection to the exact new public URL.
  3. Confirm that the site is publicly served over HTTPS.
  4. Start a new OIDC login rather than reusing a callback URL created before the change.
  5. Open Tools > Site Health and resolve runtime, redirect, and provider findings.
  6. Test login, logout, and any shortcode with redirect_back="true".

Do not test with an authorization URL copied before the migration. State and PKCE values are short-lived and tied to the request that created them.

Changing a reverse proxy or container network

When a proxy terminates TLS, ensure the WordPress runtime recognizes the browser-facing HTTPS connection. The plugin relies on WordPress' is_ssl() result and does not have a separate proxy-IP allowlist. See HTTPS and reverse proxies.

When the proxy topology changes:

  1. Verify the proxy strips client-supplied forwarding headers and sets its own X-Forwarded-Proto value.
  2. Block direct untrusted access to the WordPress or PHP service.
  3. Verify WordPress generates https:// home, login, and redirect URLs.
  4. Confirm WordPress recognizes the external request as HTTPS.
  5. Test a fresh OIDC login from a browser.

Do not trust a forwarded-proto header from every network peer. Doing so lets a client influence whether secure OIDC cookies are issued.

Restoring a database backup

After a database restore, OIDC browser sessions started before the restore can fail safely because state, nonce, code verifier, or session transients may no longer match. Start a new login rather than trying to reuse a redirect callback or browser URL from before the restore.

Then:

  1. Confirm the Client ID and Client Secret were restored correctly without displaying the secret.
  2. Check the configured scopes and general settings.
  3. Open Tools > Site Health to validate log storage and cleanup scheduling.
  4. Confirm the log table schema is available; deactivate and reactivate the plugin only if Site Health identifies missing log storage.
  5. Test a complete provider login and normal WordPress administrator login.
  6. Review restored SOL assignments, all matching rules, the additional-default-role setting, role ownership, the default role, and product restrictions. Restored data may grant outdated access until a fresh OIDC synchronization; missing role claims preserve stored records but make assignments unavailable for authorization.

Rotating the Client Secret

  1. Create or obtain the replacement secret in the managed website connection.
  2. In Scouting OIDC > Settings, enter the new Client Secret and save.
  3. Retest discovery and a complete new login.
  4. Revoke or retire the old secret according to the provider's supported process.

The saved secret is intentionally not displayed by WordPress. Leaving the Client Secret field empty while saving unrelated settings keeps the existing secret.

Recovery when OIDC login fails

  1. Use the ordinary WordPress login form with a prepared administrator account.
  2. Do not disable HTTPS checks or accept forwarded headers from arbitrary clients to regain access.
  3. Review Tools > Site Health and Scouting OIDC > Logging.
  4. Compare the live public home URL with the provider's redirect configuration.
  5. Verify the proxy and HTTPS behavior if the deployment topology changed.
  6. Use Operations and Troubleshooting for specific symptoms.

The plugin leaves the ordinary WordPress form available when it cannot safely start a Scouting OIDC session.

Rolling back from 2.7.0

An older plugin version does not enforce the new role-mapping or WooCommerce SOL Access rules. Do not use a code-only rollback as a way to preserve those access policies. Review assigned WordPress roles, active sessions, and product ordering before rollback, and use the site's tested database/code restore procedure. Removing the plugin through WordPress triggers uninstall cleanup and is not equivalent to replacing its files.

Use these recovery steps alongside the site's broader WordPress change-management process.

Clone this wiki locally