To enable debugging in WooCommerce, you need to modify your wp-config.php file. Here are the steps to do so:
- Access Your wp-config.php File:
- Using an FTP client or through your web hosting control panel’s file manager, navigate to the root directory of your WordPress installation.
- Locate the
wp-config.phpfile.
- Edit the wp-config.php File:
- Open the
wp-config.phpfile in a text editor. - Add the following lines to the file to enable debugging:
- Open the
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
- Setting
WP_DEBUGtotrueenables debugging,WP_DEBUG_LOGtells WordPress to log errors to a debug.log file, andWP_DEBUG_DISPLAYset tofalseprevents errors from being displayed on your site 23.
- Save and Upload the File:
- Save the changes to the
wp-config.phpfile. - If you were editing the file locally, upload the modified
wp-config.phpfile back to your server using your FTP client or file manager 1.
- Save the changes to the
- Verify Debugging:
- Visit your website and perform actions that previously caused errors to ensure that the debug.log file is being generated and that no errors are being displayed publicly.
- To view the contents of the debug.log file, you can access it via FTP or your hosting control panel’s file manager. The file will be located in the
wp-contentdirectory and nameddebug.log2.
Remember to disable debugging on your live site once you finish troubleshooting by setting WP_DEBUG to false or by commenting out the lines you added. Leaving debugging enabled can reveal sensitive information and affect your site’s performance.
Upgrade to our Managed WordPress Hosting Plans, Get a full-featured online store with fast, simple setup (Automatic installation of WooCommerce) and enjoy unlimited storage and visits per month. Our plans come with robust protection, including 1-click restoration, automatic daily malware scans, and unlimited malware removal and hack repair. SEO optimization and SSL certificates ensure your site is secure and easily discoverable. Plus, you’ll get a 1-click testing site and a full-featured online store with a fast, simple setup. With our plans, you’re not just getting a website. Explore our Managed WordPress Hosting Plans now!
WordPress F.A.Q articles
- How do I enable debugging in WooCommerce?
- How do I check if my payment gateway integration is working properly?
- What are some common issues that can arise with integrating a payment gateway with WooCommerce?
- What specific payment gateway requirements should I keep in mind when using WooCommerce?
- How can I test my website on different devices?