How to Debug WordPress® with cPanel and WordPress Toolkit?

This article provides a step-by-step explanation on how to quickly and easily debug your WordPress site using the WordPress Toolkit in cPanel. The WordPress Toolkit provides a convenient, easy-to-use interface in cPanel that you can use to set up and manage WordPress websites.

WordPress’s greatest asset is that it simply works, but like any complex software, bugs may appear in its code, plugins, or themes that could cause unexpected errors. Although WordPress has debugging tools, using them can be cumbersome. The WordPress Toolkit in cPanel makes debugging easier and faster by providing an intuitive interface for identifying errors.

WordPress Debug Mode: This mode logs error messages and warnings generated by the PHP code to help developers troubleshoot issues.

Debugging Options

  • WP_DEBUG: Enables or disables debugging.

  • WP_DEBUG_LOG: When enabled, WordPress writes error messages to debug.log in the wp-content directory.

  • WP_DEBUG_DISPLAY: Controls whether error messages are displayed on the site.

  • SCRIPT_DEBUG: Instructs WordPress to use unminified CSS and JS files for debugging front-end code.

  • SAVEQUERIES: Saves database queries to a PHP array for viewing.

Steps to Debug WordPress with the WordPress Toolkit

  1. Log in to cPanel.

  2. Go to Domains -> WordPress Toolkit.

  3. Select the site you want to debug.

  4. Click Debug in the Tools section to enable debug mode.

  5. Under Status, click Check Security.

  6. After choosing debugging options, click OK to start scanning the site.

  7. Errors will be logged in the debug.log file within the wp-content directory if WP_DEBUG_LOG is enabled.

Identifying Faulty Plugins

Non-developers may find it easier to identify faulty plugins through a process of elimination:

  1. Open WordPress Toolkit and select your site.

  2. Click the Plugins tab.

  3. Deactivate plugins one by one and check for the issue.

  4. Once identified, uninstall the faulty plugin.

Enabling Maintenance Mode with WordPress Toolkit

If debugging on a live site, you can enable maintenance mode to avoid user interruptions:

  1. In the WordPress Toolkit interface, select your site.

  2. Click the switch to enable Maintenance Mode.

  3. Configure and preview the maintenance page if needed.

Restoring WordPress Backups

The quickest way to fix a broken WordPress site is to restore a backup:

  1. Launch the Backup/Restore tool from WordPress Toolkit.

  2. Select a recent backup.

  3. Click Restore.

WordPress Toolkit in cPanel makes it easy to install, manage, and debug WordPress sites, allowing hosts to provide a better user experience while reducing support costs.

Last updated

Was this helpful?