Error Log Monitor

Whether you’re using WordPress for development or simply as a blog or CMS, it is always a good idea to keep an eye on your PHP error log.

  • As a developer, it helps you notice and fix errors in your code.
  • As a normal user, it lets you discover plugin bugs, WordPress compatibility issues and other problems that may be affecting your site, so that you can fix them before they seriously hurt your readers and your search engine rankings.

That’s why I’ve created Error Log Monitor – a plugin that lets you easily view the most recent messages from your PHP error log in your Dashboard, and can even send you automatic email notifications about new errors.

Features

  • Dashboard widget displays the most recent messages from your PHP error log.
  • Automatically detects the location of the log file.
  • Provides instructions for setting up error logging if it’s not enabled yet.
  • Periodically checks the log for new errors and emails them to you.
  • Configurable email address and email frequency (from every 10 minutes to weekly).
  • Configurable number of lines to display.
  • Lets you easily clear the log file.
  • The dashboard widget is only visible to administrators.

Screenshots

The PHP error log Dashboard widget with some error messages

Widget configuration screen

Download

error-log-monitor.zip

The plugin has only been tested on WordPress 3.4.x, but will probably work with any version from 3.0 and up.

Installation

  1. Upload and activate the plugin as usual.
  2. Go to your Dashboard and enable the “PHP Error Log” widget through the “Screen Options” panel.
  3. The widget should automatically display the last 20 lines from your error log. If you haven’t configured error logging yet, it will instead display instructions on how to do that.
  4. (Optional) To enable email notifications, go to widget configuration and enter your email address in the appropriate field.
  5. That’s it.

Notes

Before writing this plugin, I researched and tried a number of existing error reporting plugins. Unfortunately, most of them were either seriously out of date (no updates for more than two years), or didn’t support email notifications, which was the main feature I was looking for. So I decided to build my own.

Related posts :

29 Responses to “Error Log Monitor”

  1. Jānis Elsts says:

    Regarding the log file: file ownership could be one problem. When you view that file in your FTP application/whatever, who shows up as the file owner? What about other WordPress-related files – do they have the same owner, or something else?

    As for uploads, that seems completely unrelated to this plugin. Perhaps one of these posts will help:
    http://ecarobar.com/increase-max-upload-file-size-in-wordpress/
    http://www.wpbeginner.com/wp-tutorials/how-to-increase-the-maximum-file-upload-size-in-wordpress/

  2. Tony says:

    would it be listed in phpinfo?

  3. Tony says:

    No I want to use this plugin to find the issue plus to know if something goes wrong.. I use filezilla where would it show me owner?

  4. Tony says:

    Thank you for you attempt to help me in resolving this issue. Hope we can get this nipped.

  5. Jānis Elsts says:

    In FileZilla it would show up in the “Owner/Group” column. Depending on your FileZilla and server versions, it might be a username or a pair of numbers.

  6. Tony says:

    I login with the username of the host account…??? Its shred hosting should I contact go daddy?

  7. Jānis Elsts says:

    Perhaps. Maybe they can help.

  8. JohnN says:

    Hi
    I am having some problems getting the app to recognise the location of php-errors
    I am fairly certain that the location is properly described since it is consistent with the status report from FTP when I download it… namely /myLogs/logs/php-errors.log

    Directory permissions are all set to 755 / flcdmpe
    and the file to 644 / adfrw (though I would prefer 600.

    Any comments would be welcome

  9. Jānis Elsts says:

    You need to use the absolute path – that is, a path that starts with the root directory. What you have right now looks like a path that’s relative to your FTP home directory, and on most most servers the home directory is not the same as the system root directory.

    Try the development version of the plugin:
    https://downloads.wordpress.org/plugin/error-log-monitor.zip

    This version will show the absolute path of your WP directory in the widget. You can probably figure out the full path of the log file based on that. If no, try asking your host for the absolute path – they should know.

Leave a Reply