When importing content using Aggregator, issues such as server misconfigurations or high loads can trigger PHP errors, interfering with the import process and potentially corrupting the imported item’s data.
Since these errors happen in the background, they won’t appear on the screen like regular import errors but are rather logged in your site’s PHP error log. To help our support specialists diagnose issues, you may be asked to provide this log.
Locating the PHP Error Log
The location of the PHP error log depends on your server configuration, but the most common log file in WordPress is called debug.log. You can usually find it in the wp-content directory of your site, unless your WordPress configuration specifies a different directory.
Note: If you’re not sure where to find the log or how to access it, please ask your developer or your hosting provider to help you out.
To enable logging in WordPress, the following constants should be set in your wp-config.php file:
WP_DEBUG:true– Ensures that PHP errors are not suppressed.WP_DEBUG_DISPLAY:false– Hides errors from being displayed to visitors on your site.WP_DEBUG_LOG:true– Writes the errors to thedebug.logfile.
These settings allow WordPress to capture any PHP errors and write them to the log. If these constants are not enabled, no log file will be created and the errors will remain hidden.
Reproducing the Issue
Once debugging is enabled, you will need to reproduce the issue that caused the original error. For example, if an import is failing for a specific source, run the import again to capture the PHP errors in the log. After the error occurs, the debug.log file will contain the necessary information.
Sending the Log File
After generating the error log:
- Download the log file from the
wp-contentdirectory (or from the custom location, if applicable). - Send the log file to our support team along with a description of the issue you’re encountering.
Remember to disable debugging after the issue is reproduced. Leaving WP_DEBUG enabled can cause the log to grow large, which makes it harder to analyze and send. Additionally, the Debug Mode should not be left active on production sites as it may expose sensitive information.
Alternative Locations for Error Logs
If the debug.log file isn’t available or can’t be found in the expected location, you may need to check your server’s configuration for the PHP error log. This can vary based on the hosting environment:
- It might be located in the root directory of your website.
- Your server’s PHP configuration file (usually
php.ini) may define a custom location via theerror_logdirective.
Note: If you’re unable to locate the error log or don’t have access to the server configuration, you may need to contact your hosting provider for assistance. They can help retrieve the log file or provide additional information on where the error log is stored.
By following these steps, you can quickly gather the necessary PHP error logs and share them with our support team to help diagnose and resolve your issue.