Fix core file errors in WordPress
After confirming you are experiencing an error with a WordPress core file, you can attempt to return your site to a working state.
Understanding a WordPress related PHP error
If your previous troubleshooting revealed a PHP error, use the following table to help understand the error.
Error type | Definition and Next Steps |
---|---|
E_ERROR | This is a fatal error that causes script termination. These typically are caused by calling a non-existing object like a class or function. This can often occur in version incompatibility. Your next steps should be to update your WordPress version, themes, and plugins. |
E_WARNING | A run-time warning does not cause script termination. These are potential issues that occur but do not stop the processing of PHP. These can often include deprecation warnings, which indicates that your code may be using an outdated version of PHP and needs to be updated. A warning in your PHP logs may not necessarily be related to the issue you are experiencing. |
E_PARSE | This is a compile time parse error. It is usually indicative of a PHP syntax error, such as a missing semicolon ;, parenthesis (), or opening or closing bracket {}, or any number of other syntax errors. You should review the file and line specified in the error message and look for potential syntax error. |
E_NOTICE | These are typically PHP errors that don't cause script termination. They indicate that there could be an issue, but may be part of the normal running of the script. A common cause is using a PHP variable that is undefined. A notice in your PHP logs may not necessarily be related to the issue you are experiencing. |
Update WordPress to its latest version
Updating WordPress to its latest version will update or replace all of the core files, which often resolves core file-related errors. If the error is preventing access to your WordPress Dashboard, then you may need to update the core files through FTP.
Update your WordPress components
When your WordPress version, theme, or plugins are updated, they may develop a conflict with the other components that have not been updated. Updating the other components can restore your site. See the following to update a component of your site:
- Theme
- Plugins
- PHP version (
cPanel / Plesk / Web Hosting )