PHP errors look scary but they're messages, not mysteries. This guide maps the ones you'll most often see and the practical fixes for each.
The errors and their fixes
| Message | Meaning | Fix |
|---|---|---|
| Parse error: syntax error... | A coding mistake in a file | Edit/re-upload the named file |
| Fatal error: Allowed memory size exhausted | Script needs more memory than allowed | Raise PHP memory limit in cPanel |
| Warning/Deprecated: ... | Minor, non-fatal messages | Usually safe; update the software |
| White screen (no message) | A fatal error with display off | Turn on error display to reveal it |
| 500 Internal Server Error | Server-side failure, often PHP | See the dedicated guide |
Parse error — it says the file
A parse error tells you exactly which file broke — usually a theme or plugin after a bad edit or incomplete upload. Fix the file (or re-upload the original from your backup). If you can't reach the admin to fix it in place, edit it via File Manager.
Allowed memory size exhausted
The script hit the PHP memory_limit. Bump it: in Select PHP Version (in cPanel) click Options and raise memory_limit from the default to 256M (WordPress and heavier plugins usually run happily at that). If it still exhausts, a plugin is misbehaving — see WordPress Critical Error recovery.
White screen of nothing
A completely blank page usually means a fatal error with display turned off. Temporarily turn it on by editing public_html/wp-config.php to add:
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
Reload — the real error appears. Remove the lines when done. For non-WordPress sites, a simple test file (a blank .php file containing <?php phpinfo(); ?>) can confirm PHP is running; then remove it promptly for security.
Warnings and "deprecated" notices
Notices and warnings are non-fatal — the page still works. They're a nudge that software uses older PHP features. They usually disappear with software updates or a newer PHP version. You can also hide them in production by keeping error display off and enabling only error logging.
Errors right after changing PHP?
Switch back to the previous version in cPanel — instant revert — then check plugin/theme compatibility before retrying.