Skip to content

Instantly share code, notes, and snippets.

@mojowen
Last active December 12, 2015 03:38
Show Gist options
  • Save mojowen/4708399 to your computer and use it in GitHub Desktop.
Save mojowen/4708399 to your computer and use it in GitHub Desktop.
Running @facebook/phpsh with WordPress functions
#!/bin/bash
# First install https://github.com/facebook/phpsh
# And ctags https://github.com/mxcl/homebrew/blob/master/Library/Formula/ctags.rb
# From http://vocecommunications.com/blog/2010/12/how-to-setup-an-interactive-wordpress-shell/
if [ ! -f ./.wp-shell.php ];
then
echo '<?php include_once("wp-load.php"); include_once("wp-admin/includes/admin.php"); ?>' > ./.wp-shell.php
fi
echo "Launching WP Shell..."
phpsh ./.wp-shell.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment