How to Access WordPress Logs on Your Site

Edited

Overview

Accessing WordPress logs is essential for diagnosing and resolving issues on your website. BionicWP provides multiple methods to access these logs, allowing you to troubleshoot errors effectively.​


How It Works

BionicWP offers several avenues to access your site's logs:​

  • BionicWP Control Panel Logs: View logs directly from your site's dashboard.

  • php-errors Log: Access error logs via SFTP in the /tmp directory.​

    WP_DEBUG_LOG: Enable WordPress debug mode to generate logs in the /wp-content directory.​

  • WooCommerce Logs: For WooCommerce sites, access logs in /wp-content/uploads/wc-logs.


Step-by-Step Instructions

1. BionicWP Control Panel Logs

  1. Log into your BionicWP dashboard at my.bionicwp.com.​

  2. Navigate to “Sites” and select the site you wish to inspect.​

  3. Click on the Logs tab.​

  4. Use the dropdown menu to filter logs by status codes.

  5. Click the Refresh button to load the most recent logs.​

Note: If logs are not displaying, ensure that WP_DEBUG_LOG is not enabled, as it can interfere with the control panel's log reporting.​

2. Accessing php-errors Log via SFTP

  1. Connect to your site via SFTP.​

  2. Navigate to the parent directory above /htdocs.​

  3. Locate the /tmp folder.​

  4. Inside /tmp, find the php-errors log file.​

3. Enabling WP_DEBUG_LOG

  1. Connect to your site via SFTP.​

  2. Locate and edit the wp-config.php file in your site's root directory.​

  3. Find the line:​

    define( 'WP_DEBUG', false ); 
  4. Replace it with:​

    define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); 
  5. Save the file.​

  6. The debug.log file will be generated in the /wp-content directory.​

4. Accessing WooCommerce Logs

  1. Connect to your site via SFTP.​

  2. Navigate to /wp-content/uploads/wc-logs.​

  3. Access the relevant WooCommerce log files for troubleshooting.​


Pro Tip: Regularly monitoring your site's logs can help you proactively identify and resolve issues, ensuring optimal performance and user experience.