Follow this tutorial if you want to show errors on the page. Scenario 1 is global solution which you can use in any php CMS/framework or in core PHP. Scenario 2 is specific to the WordPress CMS to Enable Error Reporting so you can debug your website for errors.
Scenario 1: Show errors on specific page:
Add the following code at the top of file for which you want to enable error display
1 2 3 |
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); |
Scenario 2: show errors Globally on all wordpress pages:
Update the following code inside wp-config.php
 file
1 |
define( 'WP_DEBUG', true ); |
Or
1 2 3 4 |
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); @ini_set('display_errors', 0); |