Skip to content
Coupon Affiliates
  • Features
  • Pricing
  • Testimonials
  • Support
    • Support Ticket
    • Sales Support
    • Documentation
    • Roadmap
    • Changelog
    • Plugin Demo
    • Setup Services
    • Account
  • Contact Us
  • Blog
  • Trusted by 5800+ businesses to power their affiliate program.
  • Try for free
Coupon Affiliates

Plugin Documentation

Setup

4
  • Setup Guide – How to get started!
  • How to install the Coupon Affiliates Plugin
  • How to assign users to coupons.
  • Shortcodes

Commission + Payouts

31
  • (PRO) Commission Tracking and Payouts
  • Flexible Commission Settings
  • Set custom commission per affiliate / coupon.
  • Set custom commission per product
  • Set custom commission per user role.
  • Set per-affiliate product-level commission rates.
  • Set a custom referrer for orders.
  • (PRO) Invoices
  • (PRO) Statements
  • (PRO) Scheduled Payout Requests
  • (PRO) Automatic Payouts
  • (PRO) Payouts – How to Pay Affiliates
  • (PRO) Lifetime Commission
  • (PRO) User Registrations as Lifetime Referral
  • (PRO) User-Role Specific Payout Methods
  • Maximum Commission Per Order
  • Hide Commission for Non-Affiliate Coupons.
  • How to edit an affiliates “unpaid commission”?
  • Manual Admin Payouts Requests
  • (FREE) How to pay affiliates with the FREE version.
  • Never update the saved “commission” value for past orders.
  • Unpaid Commission is “0” even though there are referred orders.
  • Method: PayPal Payouts
    • (PRO) PayPal Payouts
    • (PRO) PayPal Payouts – Setup
    • (PRO) PayPal Payouts – Error Messages
  • Method: Stripe Payouts
    • (PRO) Stripe Payouts
    • (PRO) Stripe Payouts – Setup Guide
    • (PRO) Stripe Payouts – Standard vs Express
  • Method: Store Credit
    • (PRO) Store Credit Payouts
    • (PRO) Store Credit Payouts – Integrations
  • Method: Bank Transfer
    • (PRO) Bank Transfer Payouts

Affiliate Dashboard

8
  • Affiliate Portal
  • Affiliate Dashboard Statistics
  • Recent Orders Table
  • (PRO) Monthly Summary Table
  • (PRO) Export to Excel
  • (PRO) Line Graphs
  • (PRO) Product Rates Table
  • (PRO) Custom Tabs

Referral URLs

12
  • Referral URLs
  • Referral URL Click History (Visits)
  • (PRO) Referral URL Campaigns
  • (PRO) Creatives
  • (PRO) Dynamic Creatives
  • (PRO) Affiliate Landing Pages
  • (PRO) Dynamic Landing Pages
  • (PRO) Social Sharing for Referral URLs
  • (PRO) Short URL Generator for Referral URLs
  • (PRO) QR Code Generator for Referral URLs
  • (PRO) Direct Link Tracking
  • Tracking URL Conversions Without Coupon

Affiliate Registration

12
  • Affiliate Registration
  • Create Affiliate Registrations Manually
  • Template Coupon Code
  • Registration Form CAPTCHA (Spam Prevention)
  • (PRO) Dynamic Coupon Generation
  • (PRO) Multiple Template Coupons
  • (PRO) Custom Fields for Affiliate Registration
  • (PRO) Automatically Accept Affiliate Registrations
  • (PRO) Auto Affiliate Registration for New Users
  • How to Prevent Spam Submissions on Your Affiliate Registration Form
  • (PRO) Affiliate Registration on Checkout
  • Mailing List Integrations

Reporting

2
  • Admin Reports & Analytics
  • (PRO) Affiliate Email Reports

Multi-Level Affiliates

6
  • Multi-Level Affiliates – Overview
  • (PRO) MLA – How to edit a user’s parents
  • (PRO) MLA – How to edit the MLA “unpaid commission” for a parent
  • (PRO) MLA – Make MLA invite links a normal referral link.
  • (PRO) MLA – Make MLA Dashboard “Invite Only”
  • (PRO) MLA – Auto-assign referred customers as an MLA sub-affiliate.

Integrations

7
  • WooCommerce – Integration Guide
  • LifterLMS – Integration Guide
  • LearnDash – Integration Guide
  • TutorLMS – Integration Guide
  • MemberPress – Integration Guide
  • Paid Memberships Pro – Integration Guide
  • (PRO) Store Credit Payouts – Integrations

Admin Tools

7
  • Import/Export Custom Tables
  • Bulk Create: Affiliate Coupons
  • Bulk Assign: Coupons to Orders
  • Bulk Edit: Product Settings
  • Bulk Edit: Coupon Settings
  • Signup Promo Page Generator
  • Affiliate Terms of Use Generator

Other Features

15
  • Affiliate Groups
  • (PRO) Performance Bonuses
  • (PRO) Affiliate Leaderboards
  • Affiliate Fraud Prevention Features
  • Email Notifications
  • Multi-Currency Support & Setup
  • (PRO) Automated Conversion Rates
  • Admin – List of all ‘Affiliate Dashboard’ Links
  • Admin – Assign affiliate users to coupons
  • Limit coupons to new customers only (first order)
  • Subscriptions (Recurring Referrals)
  • Tax/VAT Calculations
  • Vanity Coupon Codes
  • Show “Affiliate” link on “My Account” Page
  • Automatically send emails when affiliates reach certain goals

General Questions + Help

39
  • How do I get support?
  • Translations & Localization
  • How to refresh statistics for past orders
  • Select which order statuses to show on the affiliate dashboard
  • How to “Quick Edit” your WooCommerce Coupon Codes
  • How to manually assign referral coupons to “completed” orders
  • Set additional email addresses for affiliate notifications.
  • Set the coupon history start date
  • How to customise the email templates
  • My PRO features and settings are not showing. How do I fix this?
  • How do I only show “completed” orders on affiliate dashboard?
  • How do I change commission rates for new orders only?
  • How do I apply custom tax adjustments to stats and commission?
  • How do I include or exclude tax/VAT from stats and commission?
  • What happens when an order is refunded or partially refunded?
  • Are shipping costs excluded from stats and calcuations?
  • How can I prevent the calculated commission for past orders from changing if I update commission rates?
  • Can I assign affiliate users to multiple coupons?
  • How do I manually connect an affiliate to an existing customer as a lifetime affiliate?
  • Change the “Affiliate” text to say something else such as “Refer a Friend”.
  • Can I use this plugin for coupon marketing campaigns?
  • How to migrate from other affiliate plugins?
  • How to Delete A WordPress User
  • How to Remove an Affiliate User
  • How to migrate my data to a new website?
  • Will more features be added in the future?
  • What’s the difference between Yearly and Lifetime plan?
  • Using One License for Live / Production, Staging, Dev and Localhost Sites
  • Users can not login after their affiliate registration is accepted.
  • Does the plugin work with WooCommerce High-Performance Order Storage?
  • How to Check if Cron Jobs are Working in WordPress
  • Replace WP-Cron with a Real Cron Job
  • Limit WooCommerce coupons to only be used on certain products
  • Apply coupon field is not showing on cart / checkout
  • How to join the beta program.
  • Do you have a demo site where I can try the PRO version?
  • My PRO version will not activate, it stays on the free version.
  • Using One License for Live & Staging Sites
  • Switch PRO license to another website or domain

Errors and Issues

15
  • Why referral links / URLs may not work, and how to fix them.
  • My email notifications are not working. How do I fix this?
  • Short URLs are not working, how do I fix them?
  • Affiliate dashboard is not showing, or it doesn’t stop saying “loading”. How do I fix this?
  • The stats/content isn’t loading on my dashboard. How can I fix this?
  • How to fix empty admin reports (showing as “0”).
  • Hosted with Cloudways? How to fix ajax loading error on affiliate dashboard.
  • How to fix “ERROR: Failed to load ajax request.”
  • How to Fix “404 Error on Posts or Pages” in WordPress
  • Dashboard link is showing a 404 error?
  • WooCommerce password reset link shows “page not found”.
  • How to fix “Invalid Post Type” error.
  • How to Increase “PHP Time Limit” on a WordPress Site
  • How to increase PHP “Max Input Vars” Limit
  • How to Check WP_DEBUG Logs in WordPress

Developers

2
  • Developers: Code Snippets & Resources
  • How to auto-apply coupon when a certain product is in WooCommerce cart
  • Home
  • Docs
  • Errors and Issues
  • How to Check WP_DEBUG Logs in WordPress
View Categories

How to Check WP_DEBUG Logs in WordPress

4 min read

WP_DEBUG is a WordPress constant that enables debugging mode, allowing developers to troubleshoot issues by logging errors, warnings, and notices. This guide explains how to check WP_DEBUG logs using various methods.

Prerequisites

  • Access to your WordPress installation (via hosting control panel, FTP, or SSH).
  • Basic understanding of WordPress configuration files.
  • WP_DEBUG enabled in your wp-config.php file. To enable it, add or modify the following lines:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false ); // Prevents errors from displaying on the site

Method 1: Checking Debug Logs via File Access

WordPress stores debug logs in a file when WP_DEBUG_LOG is enabled. By default, the log file is located at wp-content/debug.log, but you can specify a custom location for better organization or security.

Steps:

  1. Configure Log Location:
  • For the default log location, ensure WP_DEBUG_LOG is set to true in wp-config.php.
  • For a custom log location, add or edit the following line in wp-config.php to specify a path:
define( 'WP_DEBUG_LOG', '/path/to/custom/debug.log' );
  • Ensure the directory is writable by the web server (e.g., set permissions to 664 or 666 for the file and 755 for the directory).
  1. Access Your WordPress Files:
  • Use an FTP client (e.g., FileZilla) or your hosting file manager to access your WordPress installation.
  • Alternatively, use SSH to connect to your server for faster access.
  1. Locate the Debug Log:
  • Navigate to the wp-content directory for the default log (wp-content/debug.log) or to your custom path (e.g., /path/to/custom/debug.log).
  • If the log file doesn’t exist, ensure WP_DEBUG_LOG is correctly configured and trigger an action on your site (e.g., refreshing a page) to generate logs.
  1. View the Log:
  • Download the log file and open it with a text editor (e.g., Notepad++, VS Code).
  • Alternatively, use SSH to view the file directly with a command like cat wp-content/debug.log or cat /path/to/custom/debug.log.
  1. Interpret the Logs:
  • Logs include timestamps, error types (e.g., PHP Warning, PHP Notice), and details about the issue, including the file and line number causing the error.

Notes:

  • Custom log locations are useful when wp-content is not writable or for organizing logs in a secure directory.
  • Ensure custom paths are not publicly accessible to prevent exposing sensitive information.
  • If the log file is large, use tools like grep (e.g., grep "PHP Error" wp-content/debug.log) to filter specific errors.
  • Regularly clear or rotate the log file to prevent it from growing too large.

Method 2: Using a Debugging Plugin

Several WordPress plugins simplify the process of viewing debug logs without direct file access.

Recommended Plugins:

  • Debug Log Manager: A dedicated plugin for enabling, managing and viewing debug logs.
  • Query Monitor: Displays debug information, including errors, directly in the WordPress admin panel.
  • Debug Bar: Adds a debug menu to the admin bar, showing logs and other debugging data.

Steps:

  1. Install a Plugin:
  • Go to Plugins > Add New in your WordPress admin panel.
  • Search for and install your chosen debugging plugin (e.g., Debug Log Manager).
  • Activate the plugin.
  1. Access Debug Logs:
  • For Debug Log Manager, navigate to Tools > Debug Log Manager in the WordPress admin panel to view, filter, or download the debug log. The plugin also allows you to clear logs or configure log settings.
  • For Query Monitor, navigate to the Query Monitor menu in the admin bar to view errors and logs.
  • For Debug Bar, click the Debug Bar in the admin bar and explore the log section.

Notes:

  • Plugins may require WP_DEBUG and WP_DEBUG_LOG to be enabled.
  • Debug Log Manager offers additional features like log filtering by error type and log file size management.

Method 3: Real-Time Debugging with a Terminal

For advanced users, you can monitor debug logs in real-time using SSH and terminal commands.

Steps:

  1. Access Your Server via SSH:
  • Connect to your server using an SSH client (e.g., PuTTY or terminal).
  1. Monitor the Debug Log:
  • Run the following command to watch the log file in real-time:
tail -f wp-content/debug.log
  • For a custom log location, use:
tail -f /path/to/custom/debug.log
  • The -f flag ensures new log entries are displayed as they are written.
  1. Trigger Actions:
  • Perform actions on your WordPress site (e.g., refresh a page, submit a form) to generate log entries.
  • Observe the terminal for immediate feedback.

Notes:

  • Use Ctrl+C to stop monitoring.
  • Combine with grep for filtering (e.g., tail -f wp-content/debug.log | grep "PHP Error").

Method 4: Using Error Log Integrations

Some hosting providers or server setups allow you to integrate WordPress debug logs with server error logs or third-party monitoring tools.

Steps:

  1. Check Hosting Control Panel:
  • Log in to your hosting control panel.
  • Look for an Error Logs or Logs section.
  • If WP_DEBUG_LOG is configured to write to a server-accessible file, errors may appear here.
  1. Integrate with Third-Party Tools:
  • Use tools like New Relic, Sentry, or Loggly to collect and analyze WordPress debug logs.
  • Configure these tools via plugins or by directing WP_DEBUG_LOG output to their APIs.

Notes:

  • This method requires additional setup and may involve costs for third-party services.
  • Ensure your hosting environment supports custom log integrations.

Best Practices

  • Disable Debugging on Live Sites: Set WP_DEBUG to false on production sites to prevent exposing sensitive information.
  • Secure Log Files: Ensure debug.log is not publicly accessible (e.g., add deny from all to .htaccess for the log file).
  • Regular Maintenance: Periodically clear or archive logs to manage disk space.
  • Test in Staging: Replicate issues in a staging environment to avoid disrupting live sites.

Troubleshooting Common Issues

No debug.log File:

  • Verify WP_DEBUG and WP_DEBUG_LOG are set to true in wp-config.php.
  • Check if the wp-content directory or custom log directory is writable (permissions should be 755 for directories and 664 or 666 for files).

Logs Are Empty:

  • Ensure actions triggering errors are performed after enabling debugging.
  • Check for syntax errors in wp-config.php that might prevent logging.

Large Log Files:

  • Use log rotation tools or plugins like Debug Log Manager to manage file size.
  • Filter logs with tools like grep to focus on relevant entries.

By using these methods, you can effectively monitor and troubleshoot issues in your WordPress site using WP_DEBUG logs. Choose the method that best fits your technical expertise and hosting environment.

Need help with something?

Create a support ticket >>
What are your Feelings

Increase your revenue with the #1 coupon-based affiliate plugin for WooCommerce... risk-free!

7 Day Trial 14 Day Money Back Guarantee No Extra Fees

Free 7 Day Trial

Product

  • Plugin Features
  • Pricing
  • Roadmap
  • Changelog
  • Feature Requests

Resources

  • Documentation
  • Plugin Demo
  • Blog
  • Testimonials
  • Comparisons

Support

  • PRO Support
  • Community Forums
  • Setup Guide
  • Enterprise Support
  • Customer Login

Company

  • About The Founder
  • Our Affiliate Program
  • Terms and Conditions
  • Privacy Policy
  • Cookies Policy

RelyWP Services

  • Plugin Setup & Customisation
  • WordPress Care Plans
  • Managed WordPress Hosting
  • Custom Coding Services
  • Website Tweaks & Fixes

Copyright © 2025 RelyWP Ltd.

Registered in England & Wales with registration number: 11865883

Twitter Facebook-f Youtube

Woo® and WooCommerce® are trademarks of WooCommerce, Inc. Coupon Affiliates is not affiliated with or endorsed by WooCommerce, Inc.

MENU logo
  • Features
  • Pricing
  • Testimonials
  • Support
    • Support Ticket
    • Sales Support
    • Documentation
    • Roadmap
    • Changelog
    • Plugin Demo
    • Setup Services
    • Account
  • Contact Us
  • Blog
  • Trusted by 5800+ businesses to power their affiliate program.
  • Try for free