How to Enable WordPress Debugging on Hostinger: Complete Guide (2026)
WordPress Knowledgebase
How to Enable WordPress Debugging on Hostinger
Learn how to activate WordPress debug mode, record PHP errors, inspect debug logs, and identify plugin or theme problems using Hostinger hPanel and File Manager.
Updated for 2026Beginner FriendlyStep-by-Step Tutorial
When a WordPress website displays a blank page, a critical error, or unexpected behavior, finding the actual cause can be difficult. The problem may come from a plugin, theme, PHP code, or another part of the website.
WordPress includes a built-in debugging system that helps identify these problems. By enabling debug mode, you can record errors in a log file and use the information to investigate what is happening behind the scenes.
If your website is hosted on Hostinger, you can enable WordPress debugging by editing the wp-config.php file through hPanel File Manager. This guide explains the process, how to read the logs, and how to disable debugging after troubleshooting.
Important: On a live website, record errors in a private log instead of displaying technical messages to visitors. Always download a copy of wp-config.php before editing it.
1. What Is WordPress Debugging?
WordPress debugging is the process of identifying errors and unexpected behavior in a WordPress website. It helps website owners and developers understand why a particular feature, page, plugin, or theme is not working correctly.
WordPress runs primarily on PHP, and problems in PHP code can prevent pages from loading correctly. Debugging tools help record relevant error information so you can investigate the cause instead of guessing.
What is WP_DEBUG?
WP_DEBUG is a built-in WordPress configuration constant. It controls whether WordPress runs in debug mode.
In a typical WordPress installation, debugging is disabled by default. The setting is usually found in the wp-config.php file:
define( 'WP_DEBUG', false );
Changing the value to true enables debugging:
define( 'WP_DEBUG', true );
When enabled, WordPress reports PHP errors, warnings, and notices that can help developers identify problems. You can combine this setting with other debugging constants to save error information in a file without displaying it publicly.
2. Why Enable WordPress Debugging on Hostinger?
Debugging is useful when your WordPress website behaves unexpectedly and you need more information than the visible error message provides.
Find plugin errors
A plugin may contain incompatible code or conflict with another extension. Debug logs can reveal the PHP file and line associated with the problem.
Identify theme problems
If a website stops working after a theme update or customization, debugging can help identify errors in theme files and functions.
Investigate PHP warnings and fatal errors
Debugging can record PHP messages that are not always visible on the public website. This information can help explain blank pages, critical errors, or broken features.
Check errors during updates
If a problem appears after updating WordPress, a plugin, or a theme, the debug log can provide useful clues about the component responsible.
Help developers troubleshoot custom code
Developers can use the recorded information to investigate custom PHP functions, integrations, and website functionality.
3. What to Do Before Enabling Debug Mode
Before changing WordPress configuration settings, prepare your website so that you can safely reverse the changes if something goes wrong.
Note the error or behavior you want to investigate.
Do not edit configuration files without a backup. A misplaced character or duplicate PHP constant can cause new errors or make your website unavailable.
4. How to Enable WP_DEBUG on Hostinger
The standard method is to edit the wp-config.php file from Hostinger File Manager. You do not need to install another plugin for this method.
Find the WordPress website you want to troubleshoot.
Open its management dashboard.
Step 2: Open File Manager
From the website management dashboard, navigate to Files → File Manager. Open the directory containing your WordPress installation. For many primary-domain installations, this is the public_html directory.
If WordPress is installed in a subdirectory or another domain folder, locate the correct installation instead of editing a different website's configuration file.
Step 3: Locate wp-config.php
Find the wp-config.php file in the WordPress root directory. Right-click it and select Edit.
Before making changes, download a backup copy so you can restore the original configuration if necessary.
Step 4: Find the WP_DEBUG setting
Search the file for the following line:
define( 'WP_DEBUG', false );
If the line already exists, change false to true:
define( 'WP_DEBUG', true );
If the setting does not exist, add the definition above the following line in the configuration file:
/* That's all, stop editing! Happy publishing. */
Step 5: Save the file
Save your changes in File Manager. WordPress debugging is now enabled. However, for a live website, you should also configure error logging and disable public error display.
Important: Do not add a second WP_DEBUG definition if one already exists. Edit the existing setting to avoid duplicate constant definitions.
5. How to Enable and Find the WordPress Debug Log
Enabling WP_DEBUG activates debugging, but it is also useful to save error information in a file. WordPress provides the WP_DEBUG_LOG constant for this purpose.
Use the standard WordPress debug.log configuration
For a typical WordPress installation, use the following configuration in wp-config.php:
The custom path tells WordPress to write the log to wp-content/debug.txt, assuming the configuration file is in the WordPress root directory.
Choose one log configuration. Do not define WP_DEBUG_LOG twice. Use either the standard debug.log option or Hostinger's custom debug.txt path, not both.
How to open the debug log in Hostinger
Open Hostinger hPanel.
Go to Websites → Manage site → Files → File Manager.
Open the WordPress wp-content directory.
Look for debug.log or debug.txt, depending on the configuration you selected.
Right-click the file and select View or Edit, or download it for inspection.
If the file does not appear immediately, reproduce the problem you are investigating and check again. WordPress writes entries when relevant errors occur.
6. How to Read WordPress Debug Logs
A WordPress debug log contains messages generated while the website processes requests. These entries can help you identify which file, plugin, or theme is involved in an error.
Understand the common PHP error types
Error Type
Meaning
What to Investigate
Fatal error
A serious PHP error stops the affected execution.
Plugin, theme, function, or incompatible PHP code.
Warning
PHP reports a problem that may not stop execution.
Missing files, incorrect values, or unsupported operations.
Notice
PHP reports code that may need attention.
Incorrect or outdated code practices.
Deprecated
Code uses a feature that may be removed in a future version.
Older plugins, themes, or custom functions.
Example of a PHP error log entry
A log entry may look similar to the following example:
PHP Fatal error: Uncaught Error: Call to undefined function
example_function() in /home/user/domains/example.com/public_html/
wp-content/plugins/example-plugin/plugin.php on line 120
This is an illustrative example, not an actual error from your website. It indicates a fatal error associated with a plugin file.
What information should you look for?
Error type: Check whether the entry says Fatal error, Warning, Notice, or Deprecated.
File path: Identify whether the file belongs to a plugin, theme, or WordPress core.
Line number: Locate the line associated with the reported problem.
Timestamp: Match the log entry with the time the website problem occurred.
Function name: Look for the function or class mentioned in the message.
If the error points to a plugin file, investigate that plugin first. If it points to a theme file, review the theme's code and recent updates. Avoid editing WordPress core files to hide an error.
7. How to Use Debugging to Find WordPress Errors
Once debugging is enabled, use a consistent process to identify the cause of the problem. Avoid changing several plugins, themes, and settings simultaneously.
Step 1: Reproduce the problem
Visit the affected page or repeat the action that causes the error. For example, open a particular page, submit a form, or access the WordPress dashboard.
Step 2: Open the debug log
Return to Hostinger File Manager and inspect the latest entries in the debug log. Focus on messages that match the time you reproduced the problem.
Step 3: Identify the responsible component
Check the file path and error message. A path inside wp-content/plugins may indicate a plugin problem, while a path inside wp-content/themes may point toward a theme issue.
Step 4: Test a possible solution
Back up your website and test the suspected fix. For example, temporarily deactivate the affected plugin or switch to a default theme. If possible, perform these tests on a staging site.
Step 5: Check the log again
Repeat the same action and review the latest log entries. If the original error disappears, you may have identified the cause. If it remains, continue investigating rather than assuming the problem is resolved.
Tip: Keep a record of the original error message and the changes you make. This makes it easier to reverse a change or explain the issue to a developer or Hostinger support.
8. How to Enable Debugging with a WordPress Plugin
If you are not comfortable editing wp-config.php, a WordPress debugging plugin may offer a dashboard-based alternative.
Use the WP Debugging plugin
Log in to your WordPress Admin dashboard.
Go to Plugins → Add New Plugin.
Search for the WP Debugging plugin.
Review the plugin details and install it from the WordPress plugin directory.
Activate the plugin and open Tools → WP Debugging if the menu is available.
Review the available debugging settings and save the configuration.
The plugin can help manage WordPress debugging settings without manually editing the configuration file. Its available controls may differ by version.
Use Query Monitor for additional diagnostics
Query Monitor is another tool for developers and site administrators. It can help inspect database queries, PHP errors, scripts, styles, and other information about WordPress page requests.
Security consideration: Debugging plugins may expose technical information to logged-in users. Install only trusted tools, review who has dashboard access, and disable or remove debugging tools when they are no longer needed.
9. How to Disable WordPress Debugging on Hostinger
After identifying and fixing the issue, turn off debugging on your live website. Leaving debugging enabled unnecessarily can generate large log files and expose technical information if the logs are accessible.
Step 1: Open wp-config.php again
Log in to Hostinger hPanel, open File Manager, and locate your WordPress installation's wp-config.php file.
Step 2: Disable WP_DEBUG
Change the existing debugging configuration to:
define( 'WP_DEBUG', false );
If you added separate definitions for WP_DEBUG_LOG and WP_DEBUG_DISPLAY, review those settings too. Remove temporary debugging configuration or set it appropriately for your site's needs. Do not leave duplicate definitions in the file.
Step 3: Save the configuration
Save the updated wp-config.php file and reload your website. Confirm that the public pages and WordPress dashboard work as expected.
Step 4: Review and protect the log file
Download the log if you need it for future investigation. After saving any required information, remove temporary debug logs if they are no longer needed and can be safely deleted.
Step 5: Check your website again
Open the homepage and important internal pages.
Check the WordPress dashboard.
Test forms, checkout, and other important features.
Confirm that PHP errors are not being displayed to visitors.
Check that the original problem has been resolved.
10. Common WP_DEBUG Problems and Solutions
Sometimes debugging does not work as expected. The following table covers common issues and the checks you can perform.
Problem
Possible Reason
What to Do
Debug log is not created
Debugging is disabled, the path is incorrect, or PHP cannot write to the file.
Check WP_DEBUG, WP_DEBUG_LOG, the path, and file permissions.
No errors appear in the log
The problem was not reproduced or the relevant error is recorded elsewhere.
Repeat the action and inspect the hosting PHP error logs.
Errors appear on the website
Public error display is enabled.
Set WP_DEBUG_DISPLAY to false and review PHP display settings.
Website stops loading after editing wp-config.php
Syntax error, duplicate constant, or misplaced code.
Restore the backup or correct the configuration.
Log file becomes very large
Repeated errors are being recorded.
Fix the underlying problem, disable debugging, and review the log file.
Cannot edit wp-config.php
File editing permissions or access restrictions.
Check Hostinger File Manager permissions and account access.
What if the debug log is still empty?
First confirm that the configuration is saved in the correct WordPress installation. Check that the WP_DEBUG setting is true and that the log path is valid. Then reproduce the problem again.
If WordPress cannot create the log, review the directory permissions and check Hostinger's PHP error logging options. Do not make broad permission changes or set folders to 777 just to force logging.
What if the error is not related to WordPress?
WordPress debug logs do not necessarily capture every hosting, DNS, web server, or network problem. If the issue continues without a useful WordPress log entry, check the hosting error information or contact Hostinger support.
11. Frequently Asked Questions
What is WP_DEBUG in WordPress?
WP_DEBUG is a WordPress configuration constant that enables the built-in debugging mode. It helps report PHP errors, warnings, and notices so administrators and developers can investigate website problems.
How do I enable WP_DEBUG on Hostinger?
Open Hostinger hPanel, navigate to Files → File Manager, and locate your WordPress wp-config.php file. Change the existing WP_DEBUG setting from false to true, or add the definition before the stop-editing comment if it is not present.
Where is the WordPress debug log located?
With the standard WordPress configuration, the debug log is normally stored at wp-content/debug.log. Hostinger also documents a custom configuration that stores it as wp-content/debug.txt.
Should I enable WP_DEBUG on a live website?
You can temporarily enable debugging to investigate an issue, but avoid displaying errors publicly. Configure private logging, protect the log file, and disable debugging after troubleshooting.
What is the difference between WP_DEBUG and WP_DEBUG_LOG?
WP_DEBUG enables WordPress debugging, while WP_DEBUG_LOG controls whether debug messages are saved to a log file. The logging setting requires debugging to be enabled.
What does WP_DEBUG_DISPLAY false mean?
It tells WordPress not to display debug messages in the website's page output. This is useful on live websites because technical error details should not be exposed to visitors.
Can I enable WordPress debugging without editing code?
Yes. A plugin such as WP Debugging can provide a dashboard-based way to manage some WordPress debugging settings. However, editing wp-config.php is the direct configuration method documented by WordPress and Hostinger.
Why is my WordPress debug log empty?
The problem may not have been reproduced, the debug settings may be incorrect, or WordPress may not have permission to write to the selected path. Check the configuration and Hostinger's PHP error logs.
Should I delete the debug.log file after troubleshooting?
If you no longer need the log, download a copy if required and remove the temporary file after disabling debugging. This helps avoid keeping unnecessary technical information on the website.
Need More Help With WordPress Errors?
WordPress debugging can help identify problems, but hosting-level issues may require additional investigation. If your website continues to show errors after checking the logs, review Hostinger's documentation or contact its support team.
Editorial note: Hostinger dashboard labels and available tools may vary by hosting plan and interface updates. Always back up your configuration before editing it. Debugging output and logs can contain sensitive technical information, so keep them private and disable temporary debugging after troubleshooting.