If you’re reading this post then it clearly means that you are facing some problem in your wordpress website which needs to be rectified. Enable error logs in wordpress is one of the easiest way to know & fix the error in your wordpress website. There are multiple ways to capture error log in WordPress like enabling error log using htacess, wp-config, from Select PHP Version and using php.ini file. However in this post we will learn how to enable error logs in wordpress by editing wp-config file. The wp-config file in WordPress not only contains important WordPress configuration & details like database information, salt keys but it can also act as a very useful tool for debugging wordpress errors.
UNDERSTANDING LEVEL: VERY EASY – If in any case, even after following the exact steps shown in this tutorial, you need help or further support regarding the same, please feel free to write to us on support@myglobalhost.in and we will be happy to help you.
Steps to forcefully enable error logs for WordPress using wp-config’s file:
Step 1: Login to the control panel provided by your hosting provider. (For example cPanel, Plesk, CWP, DirectAdmin, Cyberpanel). It does not matter which control panel you’re using – the process to enable error logs in wordpress using wp-config file remains the same.
Step 2: Locate & open File Manager OR login using FTP client like Filezilla.
Step 3: Open Public_html
Step 4: Find & open/edit a file which says wp-config.php
Step 5: Read wp-config file carefully and look for the line that says ‘That’s all, stop editing! Happy blogging/publishing.’ Simple before this line you need to add the following code:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
Step 6: Click on the Save Changes button and close the file.
Reviewing your WordPress error logs file? How to check for error logs in WordPress?
Step 1: Login to the control panel.
Step 2: Locate & open File Manager OR login using FTP client like Filezilla.
Step 3: Open Public_html
Step 4: Find & open/edit a file which says error-log or debug.log. By reading the file carefully you will be able to identify the error & debug it for a clean & error free wordpress website.
Important: If you’re not able to see any of the above mentioned files then this means one of the two:
1. The above code was not properly placed.
2. Dot (.) files are hidden in your control panel. In this case contact your hosting provider or know how to show hidden files in cPanel.
We really hope that this article has helped you. If yes then please share this on Social Media so that other can also be benefited by this and if not then do not hesitate to ask us for help. Simply write to us on support@myglobalhost.in and we will be happy to help you.
Also read