Deze plugin is niet getest met de laatste drie grote versies van WordPress. Mogelijk wordt het niet meer onderhouden of ondersteund. Er kunnen ook compatibiliteitsproblemen ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

WordPress Logger


Display log messages from PHP in the browser console in Safari, Firefox (with firebug), and Opera (with the new Dragonfly debugging environment). Essential debugging tool for
plugin and theme developers. You no longer have to use ‘print_r’ statements from PHP to figure out what is going
on in the code, which more often than not, messes up the DOM and HTML layout. Displays complex PHP structures like arrays and objects
in pretty print.


  • Log debug messages directly from themes and plugins.
  • Display log messages in the browser console, without muddying up the browser display.
  • Displays complex structures such as arrays and objects in pretty print.
  • Shows the line number and file from where the message was logged ( you won’t lose track of log statements ).

For more info, comments, and feature requests, visit the plugin homepage.


Code that forces the wplogger plugin to load first was adapted from the WordPress
FirePHP plugin
developed by Ivan Weiller.

This plugin is based on PEAR Log, the logging framework that is part of the
PHP PEAR library. Current maintainers Jon Parise, Jan Schneider, and Chuck Hagenbuch. PEAR Log is based on code first
developed for the Horde 1.3 framework – original authors Chuck Hagenbuch, and Jon Parise.

Release Notes

0.3 : Added support for Opera ;

0.2.2 : Fixed formatting issues in readme.txt file;

0.2.1 : Added more detail to the readme.txt file;

0.2 : First official public release;

0.1 : First internal release;


  • Console log output in the Firefox Browser with the Firebug extension.
  • Console log output in the Safari Browser.
  • Opera Dragonfly Error Console output in the Opera Browser.


Installing from the Admin Panel

  1. Select the Add New subpanel from the Plugins panel.
  2. Type in “wordpress-logger” in the search field and click the Search button.
  3. Identify the “WordPress Logger” from the plugin list and click on its install action.
  4. Click on the Install Now button in the resulting dialog.
  5. Click on the Activate Plugin link.

Installing manually

  1. Verify that you have PHP5, which is required for this plugin.
  2. Upload the whole wordpress-logger folder into the /wp-content/plugins/ directory.
  3. Activate the plugin through the Plugins panel in WordPress.


  • Make sure that your theme template has a footer ( index.php should have a get_footer() function call at the end).
  • Turn on the console in your browser:
    • Firefox: The Firebug extension needs to be installed and activated.
    • Safari: Show the Error Console from the Debug/Develop menu. See FAQ section for details on how to enable the Debug menu.


After activating the plugin, the following PHP function call can log any PHP expression to the console log.

     $wplogger->log( php_expression [, message_type] );

The message_type is optional and can be any one of the following constants:



Logging from template files – inside the loop to display post IDs.

    <?php $wplogger->log( 'Post ID: '.$post->ID ); ?>


    [Information: from line 20 in file index.php] Post ID: 125
    [Information: from line 20 in file index.php] Post ID: 116
    [Information: from line 20 in file index.php] Post ID: 65

Logging from PHP files (e.g. functions.php) ( always a good idea to check if $wplogger is available ). Note the message type set to warning through the second parameter.

    if ($wplogger) $wplogger->log( get_option('active_plugins'), WPLOG_WARNING );


    [Warning: from line 55 in file functions.php] array (
          0 => 'wplogger/wplogger.php',
          1 => '12seconds-widget/12seconds-widget.php',
          2 => 'get-the-image/get-the-image.php',

Logging from plugins – inside a plugin function. Note the global statement to get $wplogger into current scope.

    global $wplogger; $wplogger->log( 'No images attached to this post', WPLOG_ERR );


    [Error: from line 206 in file get-the-image.php] No images attached to this post


How to enable the *Debug* / *Develop* menu in Safari?
How to show the error console in Opera?
  1. Select the Tools > Advanced > Developer Tools menu.
  2. Click on the Error Console tab in the Opera Dragonfly console.


Er zijn geen beoordelingen voor deze plugin.

Bijdragers & ontwikkelaars

“WordPress Logger” is open source software. De volgende personen hebben bijgedragen aan deze plugin.


Vertaal “WordPress Logger” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.