Poke around the WordPress environment from the comfort of your Javascript console. Everything in here is pretty dangerous, and not for use in production.
First, download into your plugins directory via your server's shell prompt:
cd /path/to/Wordpress/plugins/directory
git clone git://github.com/jcamenisch/wp-debug-util.git
Then activate the plugin via the WordPress admin panel.
First, log in to your WordPress site as an administrator. Because of the dangerous nature of the functions in this plugin, they will not work for a non-admin user.
From any Page in WordPress, open the JavaScript console in your browser of choice. From there, enter the following commands to interact with the server-side WordPress environment.
Send a PHP expression to the server, where it will be evaluated with eval
and then
output with print_r. The result is then displayed in the console.
WpDebug.print_r('2 + 2');
Returns '4'
WpDebug.print_r('is_admin()');
Returns '1'
Send any PHP code to the server, where it will be run with eval
. With this, you can
create, edit, and delete data, modify the session—and anything else that you could do
from PHP code in WordPress.
WpDebug.eval('phpinfo();');
Displays the entire output of phpinfo() to the console.
Because of some odd issues with PHP's handling of quotation marks, this plugin strips slashes from submitted code strings. To send a legitimate slash, enter two in your string.
For example, the following will raise a parse error:
WpDebug.eval("'This won\'t work.'");
However the following works fine:
WpDebug.eval("'This isn\\'t a problem.'");