Need to troubleshoot your WordPress site? By enabling WP_DEBUG in the wp-config.php file, you can quickly identify errors and warnings that are otherwise hidden. In this guide, we walk you through how to enable debug mode in WordPress step by step using the file manager in DirectAdmin at Admax Hosting.
Step 1 – Log in to DirectAdmin via the customer portal
Start by logging in to the Admax customer portal. Navigate to your web hosting service and proceed to DirectAdmin.
Step 2 – Open the file manager
Once logged in to DirectAdmin, go to the System Info & Files section and select File Manager.
Step 3 – Navigate to your domain folder
Double-click the folder that corresponds to the domain name you want to troubleshoot, for example mygreatbusiness.com. Then open the public_html folder by double-clicking it.
Step 4 – Open wp-config.php
Locate the file wp-config.php in the public_html folder. This is WordPress's main configuration file. Double-click the file to open it in the file manager's text editor.
Step 5 – Enable WP_DEBUG
Scroll down in the file until you find the line containing WP_DEBUG. Make the following changes:
Change the value of WP_DEBUG from false to true.
Press Enter to create a new line directly below.
Add the following code on the new line:
define( 'WP_DEBUG_DISPLAY', true );
💡 Tip: With WP_DEBUG enabled, PHP errors and warnings will be displayed directly on your site. WP_DEBUG_DISPLAY controls whether error messages are shown in the browser, which is useful during active troubleshooting.
Step 6 – Save the file
Once you have made your changes, click the SAVE FILE button at the top of the editor to save the file.
Step 7 – Disable debug mode when you're done
When you have finished troubleshooting, it is very important that you change both values back to false:
define( 'WP_DEBUG', false );
define( 'WP_DEBUG_DISPLAY', false );
💡 Important: Never leave debug mode enabled on a production site. Error messages can expose sensitive information such as file paths and database credentials, which poses a security risk.
Tips
Want to log errors to a file instead of displaying them on the page? Add define( 'WP_DEBUG_LOG', true ); to wp-config.php. The error log will then be saved to wp-content/debug.log.
Combine WP_DEBUG_LOG with WP_DEBUG_DISPLAY set to false to log errors in the background without visitors seeing them.
Make sure you are running the latest version of WordPress, your theme, and your plugins – many errors are caused by incompatible or outdated versions.
If you are seeing database-related errors, it may be worth checking the database connection details in wp-config.php.
Still having issues?
Have you enabled debug mode but need help interpreting the error messages, or are you experiencing other problems with your WordPress site? Don't hesitate to get in touch – our support team is happy to help!
Email: support@admax.se
Phone: 010-641 29 00