# 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.

{% hint style="info" %}
**WordPress Debug Mode**: This mode logs error messages and warnings generated by the PHP code to help developers troubleshoot issues.
{% endhint %}

#### 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.

{% hint style="warning" %}
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.
{% endhint %}

#### 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.

{% hint style="success" %}
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.
{% endhint %}

#### 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.

{% hint style="warning" %}
Use maintenance mode to notify users when the site is unavailable during debugging or updates.
{% endhint %}

#### 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**.

{% hint style="success" %}
It's best to create a new backup before making changes so that you can restore it if needed.
{% endhint %}

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clouduxe.com/wordpress/how-to-debug-wordpress-r-with-cpanel-and-wordpress-toolkit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
