NetPoa

Show PHP errors to find what is wrong with your website

Updated 27 Nov 2026

When a PHP website shows a blank page, "There has been a critical error" or a 500 error, the real reason is hidden for safety. You can show it while you fix the problem.

Turn error display off again when you finish. Errors can show file paths and other details that should not be public.

Option 1: read the error log (no changes)

  • In cPanel, under Metrics, open Errors to see the latest errors from your website.
  • In File Manager, look for a file called error_log in public_html or in the folder of the failing page. Open it and read the last lines.

Often that is all you need.

Option 2: show errors on the page

  1. In cPanel, open Select PHP Version and then the Options tab. (On some accounts: MultiPHP INI Editor, then choose your domain.)
  2. Set display_errors to On (tick it, or switch it on).
  3. Reload the broken page: the error now shows, with the file and line number.
  4. Fix the problem, then set display_errors back to Off.

For WordPress

  1. In File Manager, open public_html and edit wp-config.php.
  2. Find the line define( 'WP_DEBUG', false ); and change it to:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
  1. Reload the page. Errors are written to wp-content/debug.log, without showing them to visitors.
  2. When fixed, set WP_DEBUG back to false and delete debug.log.

What the common errors mean

Error says Usually means
Allowed memory size … exhausted Raise memory_limit in Select PHP Version › Options, or a plugin is misbehaving.
Call to undefined function A PHP extension is missing, or the PHP version is wrong: see Select PHP Version.
Failed opening required … / No such file A file is missing: an incomplete upload, or a wrong path.
Error establishing a database connection See Fix "Error establishing a database connection".
syntax error, unexpected … A typing mistake in the file and line shown, often after editing a theme's functions.php.
A plugin's folder in the path Rename that plugin's folder in wp-content/plugins to switch it off.

Still stuck? See Fix a "500 Internal Server Error", or open a ticket with the error message.

Kwa Kiswahili

Website ikionyesha ukurasa mweupe au 500 error, angalia faili la error_log kwenye File Manager, au cPanel › Errors. Kuona kosa kwenye ukurasa: Select PHP Version › Options › washa display_errors, rekebisha, kisha izime tena. WordPress: weka WP_DEBUG kuwa true kwenye wp-config.php.


Still need help? Open a ticket and we will reply.

Was this helpful?