If a Rank Math PHP fatal error has locked you out of WordPress, deactivate the plugin first. This restores access without deleting its files or settings. You can then determine whether the failure came from an incomplete update, incompatible software, or a conflict with another plugin.
Before changing files or updating software, create a backup of the site files and database.
Restore access to WordPress
If the dashboard still works, go to Plugins > Installed Plugins and deactivate Rank Math SEO.
With WP-CLI, run:
wp plugin deactivate seo-by-rank-math
The wp plugin deactivate command disables the plugin without uninstalling it.
If neither method is available, use your hosting file manager or SFTP:
- Open the
wp-content/pluginsdirectory. - Rename
seo-by-rank-mathtoseo-by-rank-math-disabled. - Reload the site and sign in to WordPress.
WordPress will deactivate the plugin because its directory is no longer available. This recovery method is documented in the WordPress troubleshooting guide.
Do not delete the renamed directory. Before updating, reinstalling, or managing Rank Math normally, rename it back to seo-by-rank-math while the plugin remains deactivated.
Find the actual fatal error
The “There has been a critical error on this website” message does not identify the cause. Check the email sent to the site administrator for a WordPress Recovery Mode link, then review your host’s PHP error log.
If no useful error is recorded, enable temporary logging in wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
Place these lines before:
/* That's all, stop editing! Happy publishing. */
Reproduce the failing action once, then inspect wp-content/debug.log. The WordPress debugging documentation explains these constants and recommends using them on staging rather than leaving debugging enabled on a live site.
Look at the first PHP Fatal error entry associated with the failure. The file path and message determine the next step:
- A path inside
seo-by-rank-mathpoints to Rank Math or code it loaded. Call to undefined functioncan mean the required function is unavailable in the installed WordPress version or has not loaded at that point in the request.Allowed memory size exhaustedindicates that the request exceeded the PHP memory limit.- A stack trace containing another plugin or theme can indicate an integration conflict.
- A syntax or missing-file error immediately after an update can indicate incomplete or damaged plugin files.
Remove the debug constants, or set WP_DEBUG to false, after collecting the error.
Check the installed versions
Record the WordPress and Rank Math versions before updating anything:
wp core version
wp plugin status seo-by-rank-math
You can also list every active plugin:
wp plugin list --status=active
Compare your installed Rank Math version with its current WordPress.org plugin listing. Check the compatibility information and changelog, especially if the error began immediately after updating WordPress or Rank Math.
An undefined WordPress function is a strong reason to check version compatibility before editing plugin code. Do not add a replacement function to your theme or modify Rank Math files to suppress the error. Such changes can hide the underlying incompatibility and will be overwritten by an update.
Reinstall or update Rank Math
If the site meets the listed requirements and the error points only to Rank Math, replace the plugin files with a clean copy.
If you renamed the plugin directory during recovery, first restore its original name, seo-by-rank-math, while leaving the plugin deactivated.
From the dashboard, make a fresh backup before deleting and reinstalling Rank Math. Plugin deletion can run uninstall routines, and the effect on saved data depends on the plugin’s data-removal settings. Confirm those settings before deleting the plugin. Then go to Plugins > Add New, search for Rank Math SEO, install it, and leave it deactivated until the installation finishes.
If an update is available, you can install it with WP-CLI:
wp plugin update seo-by-rank-math
The wp plugin update command downloads and installs the available release.
Reactivate Rank Math and repeat the action that caused the fatal error:
wp plugin activate seo-by-rank-math
If the error returns, deactivate it again and continue with conflict testing.
Test for a plugin or theme conflict
Perform this test on staging whenever possible.
- Leave Rank Math deactivated.
- Deactivate all other nonessential plugins.
- Switch to a default WordPress theme.
- Activate Rank Math.
- Repeat the failing action.
- Reactivate the other plugins one at a time until the error returns.
Pay particular attention to other SEO plugins and extensions that integrate directly with Rank Math. Running two plugins that modify the same metadata, sitemaps, redirects, or editor controls can make it harder to isolate the source of the failure.
If the error appears only with one additional plugin active, update both plugins and report the complete fatal-error line and stack trace to their developers. Do not send database credentials, license keys, or unrelated log entries.
Handle errors that started after an update
When the fatal error began directly after a Rank Math update, the safest temporary choices are:
- Keep Rank Math deactivated while investigating.
- Restore the plugin directory from a known-good site backup.
- Restore the complete pre-update backup if the update also changed data or settings.
Avoid downloading old plugin packages from unofficial websites. A previous release may contain known bugs or security issues, so use rollback only as a short-term recovery measure.
After restoring service, reproduce the problem on staging with the current release. If it persists, send Rank Math support the exact fatal-error message, WordPress version, PHP version, Rank Math version, and the action that triggers it.
Fix a PHP memory exhaustion error
If the log specifically contains Allowed memory size exhausted, check the PHP memory limit in Tools > Site Health > Info > Server or your hosting control panel.
Increasing the limit can restore the request, but it does not prove Rank Math alone caused the high memory use. Test with other plugins disabled and ask the host to inspect PHP memory consumption if the error continues. Do not raise the limit indefinitely to conceal a recurring leak or unusually expensive request.
Once Rank Math activates without another fatal error, re-enable the theme and plugins gradually, confirm that the editor and front end work, and take a fresh backup.