WP PHP Console
Note: you will at least PHP 5.4.0 or above installed on your machine or server to run this plugin.
Then, add this plugin to your WordPress installation either by:
Installing it as any other WordPress plugin from your WordPress admin Plugins page (
Downloading a copy from WordPress.org and uploading it in
wp-php-consoledirectory into your
wp-content/plugins/directory or corresponding plugins directory in your installation. You can also do this from the WordPress plugins installation admim dashboard pages.
Note: If you decide to
git clonethis repository instead, you will need
composer installto install its dependencies first, or it won't work in WordPress as it is.
Activate the plugin through the
Pluginsadmin page in WordPress
Settingsmenu go to
WP PHP Console:
Enter a password for the Eval Terminal (this setting is needed or the terminal feature simply won't work).
You can also set other options (see inline instructions or read below).
Allow only on SSL
Forces PHP Console to connect on a SSL connection only (of course then if you don't actually have SSL (https), PHP Console simply won't work).
Allowed IP Masks
You can secure your server by specifying IP addresses to restrict the accessibility from the Eval Terminal (a single address eg.
192.168.0.4or an address mask eg.
192.168.*.*or multiple IPs, comma separated
192.168.1.22,192.168.1.24,192.168.3.*). In case of having issues connecting with the Remote PHP Eval Terminal, try leaving this blank.
Register PC Class
Tick this option to register
PCin the global PHP namespace. This allows to write
PC::magic_tag($var)instructions in PHP to inspect
Show Call Stack
Short Path Names
/server/path/to/document/root/WP/wp-admin/admin.php:38will be displayed as
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.
In your PHP code on the Server, you can call PHP Console debug statements like
PC::debug() information, PHP errors, warnings, notices with optional stack trace, which will be useful to debug your plugin or theme.