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.
- 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.
The plugin has only been tested on WordPress 3.4.x, but will probably work with any version from 3.0 and up.
- Upload and activate the plugin as usual.
- Go to your Dashboard and enable the “PHP Error Log” widget through the “Screen Options” panel.
- 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.
- (Optional) To enable email notifications, go to widget configuration and enter your email address in the appropriate field.
- That’s it.
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 :