WordPress Critical Error
The "There has been a critical error on this website" screen after activating or editing a plugin.
Symptoms
- The "There has been a critical error on this website" screen after activating or editing a plugin.
Cause
A fatal PHP error: an undefined function, a name clash with another plugin, or syntax that the server's PHP version does not support.
Fix
- Enable WP_DEBUG and WP_DEBUG_LOG and check wp-content/debug.log to find the file and line.
- Disable the plugin by renaming its folder through the file manager if you cannot log in.
- Give the agent the full line from the log.
Prevention
- A unique prefix for all functions and classes.
- Test on a local site with the same PHP version as the server.
