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.
Be careful when enabling debugging on production sites! Debug information should not be visible to regular users. For live sites, it's recommended to use the debug log instead.
Steps to Debug WordPress with the WordPress Toolkit
Log in to cPanel.
Go to Domains -> WordPress Toolkit.
Select the site you want to debug.
Click Debug in the Tools section to enable debug mode.
Under Status, click Check Security.
After choosing debugging options, click OK to start scanning the site.
Errors will be logged in the
debug.log
file within the wp-content directory if WP_DEBUG_LOG is enabled.
Once the scan is complete, the toolkit will display a list of issues and suggested improvements. Fix them manually or automatically if you have WordPress Toolkit Deluxe.
Identifying Faulty Plugins
Non-developers may find it easier to identify faulty plugins through a process of elimination:
Open WordPress Toolkit and select your site.
Click the Plugins tab.
Deactivate plugins one by one and check for the issue.
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:
In the WordPress Toolkit interface, select your site.
Click the switch to enable Maintenance Mode.
Configure and preview the maintenance page if needed.
Use maintenance mode to notify users when the site is unavailable during debugging or updates.
Restoring WordPress Backups
The quickest way to fix a broken WordPress site is to restore a backup:
Launch the Backup/Restore tool from WordPress Toolkit.
Select a recent backup.
Click Restore.
It's best to create a new backup before making changes so that you can restore it if needed.
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?