The error log is the file storing error messages from PHP, Apache, and other server components. When a site malfunctions or shows the "White Screen of Death", the first step is to read the error log. This file often shows you exactly where the error occurred.
Where is the error log?
In cPanel the Errors menu shows the last 300 errors. Full file: /home/user/logs/error_log or /home/user/public_html/error_log. PHP error log: defined by the error_log directive (default /home/user/php-error.log).
PHP error types
Notice β the lowest level. "Notice: Undefined variable" β a variable was not declared. The site works but the code can be improved.
Warning β stronger. "Warning: include() failed" β file not found but the site continues. Should be fixed.
Fatal Error β the site stops. "Fatal error: Allowed memory size exhausted" β RAM ran out (raise memory_limit). "Fatal error: Call to undefined function" β function missing (plugin needs update).
Parse Error β PHP syntax error. "Parse error: syntax error, unexpected '}'" β unbalanced braces. This code never runs.
Most common WordPress errors
"Allowed memory size of 134217728 bytes exhausted" β memory_limit of 128M exceeded. Fix: in wp-config.php define('WP_MEMORY_LIMIT', '256M') or in .user.ini memory_limit = 256M.
"Maximum execution time of 30 seconds exceeded" β a script ran over 30 seconds. Fix: max_execution_time = 60 or 120.
"MySQL server has gone away" β MySQL connection dropped. Fix: in wp-config add WP_DB_REPAIR or raise MySQL wait_timeout.
"There has been a critical error" (WP 5.2+) β fatal error protection. The cause is detailed in the error log.
Debugging an error
Step 1: look at the last 50-100 lines of the log file. tail -100 error_log or via cPanel Error.
Step 2: search the error text on Google. Most errors others have seen too, solutions exist (StackOverflow, WordPress forums).
Step 3: enable WordPress debug: in wp-config define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true);. This writes more info to wp-content/debug.log.
Sayt.uz practice
Sayt.uz clients view error logs via cPanel Errors (last 300 errors). 65% of support requests begin with error log analysis. Most common WordPress errors: memory limit (38%), plugin conflict (24%), MySQL connection (12%), broken .htaccess (9%), others. Tip: check the error log file regularly β even if you have no problem, catching early warning signs is better.