How to Enable Debug Mode to Troubleshoot MailerPress

If MailerPress or MailerPress Pro does not behave as expected, debug logs record the errors behind the problem and help our support team find the cause quickly. This guide shows how to turn logging on, where to find the log files, and how to turn it off afterwards.

Enable WordPress debug logging

  1. Connect to your server with SFTP (a secure file transfer tool) or your host’s file manager. If you don’t have access details, ask your hosting provider.
  2. Open wp-config.php, the WordPress configuration file at the root of your installation.
  3. Add these lines above the line /* That's all, stop editing! */. If some of them already exist, change their value instead of adding them twice.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

With WP_DEBUG_DISPLAY set to false, errors go to the log without being shown to your visitors.

Save the file, then reproduce the problem: reload the page where it happens or repeat the action that fails. WordPress writes the errors to wp-content/debug.log. Download this file.

MailerPress log files

When WP_DEBUG_LOG is enabled, MailerPress also writes its own log files, for example queue-debug.log (sending queue), cleanup.log and database-repair-YYYY-MM-DD.log (database repair). You find them in wp-content/uploads, in a folder whose name starts with mailerpress-logs. This folder can’t be opened from a browser, so download the files with SFTP.

Detailed MailerPress log

If our support team asks for more details, also add this line to wp-config.php:

define( 'MAILERPRESS_DEBUG', true );

MailerPress then writes a detailed daily log to wp-content/plugins/mailerpress/logs/mailerpress-YYYY-MM-DD.log. This folder is replaced when you update MailerPress, so download the logs before updating.

Database report

For database problems, go to MailerPress > Tools > Database Repair and click Export Full Report. See Repair your MailerPress database.

Send the logs to support

Open a support ticket and attach debug.log and, if relevant, the MailerPress log files. Give the date and time when you reproduced the problem so that we can find the matching lines.

Turn debugging off

For security reasons, disable debugging once troubleshooting is complete: remove the lines you added to wp-config.php or set them to false, including MAILERPRESS_DEBUG. Then delete the log files: they can contain personal data such as email addresses.