In WordPress, PHP error logs are files that contain information about any errors or warnings that occur within the PHP code of your WordPress site. These logs are useful for troubleshooting issues with your WordPress site.
How to enable the WordPress Debug mode
To enable the PHP error log for WordPress you will need to connect to your site while using FTP and then edit the wp-config.php file
After you’ve opened this file you will need to add the following lines of code before the text where it says “That’s all, stop editing! Happy publishing.”
1 2 3
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); /* That's all, stop editing! Happy publishing. */
This code will enable debugging mode in WordPress and write any PHP errors to a log file.
Where to view the WordPress Error logs
After you enabled WordPress Debug mode, you will need to go to the “wp-content” directory to find the “debug.log” file (again being connected to your site via FTP), then right-click on this file and choose to View/Edit the file.
After accessing the error log file, you will be able to review the error messages along with their corresponding date and time stamps.
To disable the Debug mode, you will just need to set the WP_DEBUG and WP_DEBUG_LOG lines to “false”.
1 2 3
define( 'WP_DEBUG', false ); define( 'WP_DEBUG_LOG', false ); /* That's all, stop editing! Happy publishing. */
In case you’re not experienced with connecting to your site via FTP or you were not successful in viewing the PHP Error Logs, please contact your hosting provider and ask them for help regarding this.
Profile Builder Pro
Create beautiful front-end registration and profile forms with custom fields. Setup member directories, custom redirects, cutomize user emails & more using the all in one user management plugin.Unlock PRO Features