PHP & Software

Common PHP Errors and How to Fix Them

Decode parse errors, memory limits, white screens and 500 errors — and fix them via cPanel without calling support.

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

MessageMeaningFix
Parse error: syntax error...A coding mistake in a fileEdit/re-upload the named file
Fatal error: Allowed memory size exhaustedScript needs more memory than allowedRaise PHP memory limit in cPanel
Warning/Deprecated: ...Minor, non-fatal messagesUsually safe; update the software
White screen (no message)A fatal error with display offTurn on error display to reveal it
500 Internal Server ErrorServer-side failure, often PHPSee 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.

Was this article helpful?

Your feedback helps us improve our guides.

Still need a hand?

Contact WebFulHost Support — our team is available 24/7.