WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Fulvio Notarstefano v1.6.0

WP PHP Console

An implementation of PHP Console as a WordPress plugin. Use Chrome Dev Tools to debug your WordPress installation!

WP PHP Console

The facts

Rating
4.7★ from 19
Active installs
500+
Price
Free
Last updated
9 Nov 2020
Added
Jan 2015
Requires WP
3.6.0
Tested up to
WP 5.5.20
Requires PHP
5.6
Downloads
59,027

Our analysis

AI-assisted

WP PHP Console is a WordPress plugin designed for developers to handle PHP errors and exceptions, execute PHP code remotely, and dump variables. It integrates with the Google Chrome extension PHP Console, allowing you to test WordPress-specific functions or classes directly from your browser's terminal. This tool is particularly useful for debugging and inspecting results without needing to leave the browser or write temporary PHP code in files.

To use the plugin, you must enter a password to access the PHP Console features. Once authenticated, you can run PHP code, view outputs, and catch errors in the Chrome Dev Tools JavaScript console, making it easier to debug themes and plugins directly from the browser.

Best for: This plugin suits developers looking for a debugging tool for WordPress.

What it does well

  • Handles PHP errors and exceptions
  • Executes PHP code remotely
  • Integrates with Chrome Dev Tools
  • Allows debugging of WordPress functions
  • No need to leave the browser for logs

Where it falls short

  • Requires PHP version 5.6 or above
  • Limited information on support and updates
  • Last updated in November 2020

Verdict

WP PHP Console offers a practical solution for debugging and testing PHP code in WordPress. However, its last update was in 2020, which may raise concerns about ongoing support.

From the developer

Fulvio Notarstefano's own description of WP PHP Console, lightly tidied.

PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things using Google Chrome extension PHP Console and PHP Console server library.

This implementation of PHP Console is a handy tool to make it easier to test on the fly any WordPress specific function or class (including those introduced by your active theme and plugins!) from a terminal and inspect results, catch errors and warnings with complete call stack trace straight from the Chrome JavaScript console. In other words, besides debugging, you can execute PHP or WordPress-specific PHP code straight from the terminal and print PHP variables in Chrome Dev Tools JavaScript console along with your normal JavaScript debugging and testing. Keep everything in one place, without leaving the browser to check for your logs or writing temporary PHP test code on a PHP file and refresh your browser page.

Note: PHP version 5.6.0 or above is required to use this plugin.

For support and pull requests, please refer to WP PHP Console GitHub repo and read the instructions there – thank you.

Usage

After you entered WP PHP Plugin password, your browser address bar should show a yellow “key” icon, which, if clicked, will prompt for the password you have set earlier.
The “key” icon will change into a “terminal” icon, click on it to open the PHP Console eval & options form.

After entering the correct password, you can use the Eval Terminal in the PHP Console eval & options form and run any PHP code from it, including WordPress’s own functions: enter one or more lines of PHP code in the black Eval terminal screen, press Ctrl+Enter and see the result in Chrome Dev Tools JavaScript console.
The result includes the output, the return value and the net server execution time.

In your PHP code on the Server, you can call PHP Console debug statements like PC::debug( $var, $tag ) to display PHP variables in the JavaScript console and optionally filter selected tags through the PHP Console eval & options form opened from the address bar in your browser.

In the JavaScript console you will see printed any `PC::debug()“ information, PHP errors, warnings, notices with optional stack trace, which will be useful to debug your plugin or theme.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for developer tooling.

WPCode

WPCode

93

Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code snippets with conditio...

Free 3M+ installs 4.9★ (1,873)
Header Footer Code Manager

Easily add tracking code snippets, conversion pixels, or other scripts required by third party services for an...

Free 600k+ installs 4.9★ (309)
Admin and Site Enhancements

Duplicate post, post order, image resize, email via SMTP, admin menu editor, custom css / code, disable gutenb...

Free 200k+ installs 5★ (421)
Shortcoder

Create custom "Shortcodes" easily for HTML, JavaScript, CSS code snippets and use the shortcodes wit...

Free 100k+ installs 4.9★ (227)
Insert PHP Code Snippet

Add PHP code to your pages and posts easily using shortcodes.

Free 90k+ installs 4.9★ (705)
Code Snippets

An easy, clean, and simple way to enhance your site with code snippets.

Free 1M+ installs 4.7★ (509)