2017 © Pedro Peláez
 

wordpress-plugin wp-php-console

A WordPress implementation of PHP Console.

image

usabilitydynamics/wp-php-console

A WordPress implementation of PHP Console.

  • Monday, November 24, 2014
  • by andy.potanin
  • Repository
  • 10 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

WP PHP Console

This is an implementation of PHP Console as a WordPress plugin., (*1)

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

This implementation for WordPress allows you to test any WordPress specific function or class (including those introduced by your active theme and plugins!) from PHP Console terminal and inspect results, catch error and warnings with stack trace straight from Chrome Dev Tools console., (*3)

Installation

Follow these steps:, (*4)

  1. First, install PHP Console for Google Chrome., (*5)

  2. Then, add this plugin to your WordPress installation (by placing it into your wp-content/plugins/ directory). Note: If you are cloning or manually downloading this git repo from GitHub, make sure to init PHP Console git submodule (i.e. lib\php-console directory should not be empty - this step is not necessary if you happen to download this plugin from WordPress.org)., (*6)

  3. Once installed, activate WP PHP Console from WordPress plugins dashboard page; then go to PHP Console settings page from the Settings menu. From here you need to enter a password for the eval terminal (required, otherwise the eval terminal simply won't work)., (*7)

Options

In WP PHP Console settings page, you can also tick a checkbox to use the terminal only on a SSL connection (of course then if you don't have SSL the terminal simply won't work). You can also specify IP addresses to restrict the accessibility to the eval terminal (a single address eg. 192.168.0.4; or an address mask eg. 192.168.*.* or multiple IPs, comma separated 192.168.1.22,192.168.1.24,192.168.3.*)., (*8)

Usage

Once you have set up a password, you can navigate any of your WordPress page (including WordPress admin) and try the console. You will se a "key" icon in your browser address bar. By clicking on it, it will prompt for the password you have set just before. After entering the correct password, you can use the eval terminal and run any PHP code from it, including WordPress own functions. Furthermore, in Chrome Dev Tools console you will also see printed any PHP errors, warnings, notices with stack trace, which will be useful to debug your plugin or theme., (*9)

Caveats

You should not use this plugin or PHP Console library in a production environment, rather a development/testing environment. You will otherwise add more load to your server and even put your site at risk since you're exposing PHP code publicly., (*10)

Browser support

Currently PHP Console only supports Google Chrome browser. If you're using for example Firefox or Opera this plugin won't be of much use to you at the moment., (*11)

The Versions

24/11 2014

dev-master

9999999-dev https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2 or later

The Requires

 

wordpress debug development debugging

07/11 2014

1.1.0

1.1.0.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2 or later

wordpress debug development debugging