How To Display PHP Errors In WordPress

If you need to debug PHP errors in WordPress, it can really help to display them for a start. You can do this by calling the ini_set(); function to display your PHP errors.

Displaying PHP errors In WordPress

To display your PHP errors in WordPress, you need to call an ini_set(); function in your WordPress theme’s functions.php file.

  1. Navigate to Appearance > Editor > Theme Functions from your WordPress Dashboard;
  2. Copy and paste the code below;
  3. Click Update File to save the changes.
ini_set( 'display_errors', 1 );