Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Forked from joshlevinson/.bash_profile
Last active October 28, 2020 20:00
Show Gist options
  • Save kjohnson/ad2732b6774e9faaa417ee261eefbad2 to your computer and use it in GitHub Desktop.
Save kjohnson/ad2732b6774e9faaa417ee261eefbad2 to your computer and use it in GitHub Desktop.
WP CLI + Xdebug
function wpx {
export XDEBUG_CONFIG="idekey=WPCLIDEBUG remote_connect_back=1"
wp "$@"
unset XDEBUG_CONFIG
};
@kjohnson
Copy link
Author

Add this to ~/.bash_aliases.

Use wpx instead of wp when you want to leverage xdebug with wp-cli commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment