Pick our brains...

WP CLI Does Not Work, No Output, No Errors in the Logs

WP CLI is an amazing and very powerful command line tool for administering WordPress sites, plugins, themes, and core files. Once you’re comfortable with it, you’ll wonder how you ever managed without it!

So, you just installed this spiffy tool on your server, and you go to test it with php wp-cli.phar --info. No output. Nothing. And no discernible errors in the usual server logs. What on Earth is going on?

You may have hit a security protection mechanism with suhosin, a php extension that reduces the “attackable surface” of web applications through function whitelists, resource limits, transparent session and cookie encryption, binary content filters, logging, and various other protections.

How do we fix it? Good question. And here’s the answer.

Add a section to your php.ini file for suhosin tweaks, and add the following line:

suhosin.executor.include.whitelist="phar"

Voila.

ps: Httpd shouldn’t need to be restarted for this to take effect. But if the wp cli phar still won’t run, go ahead and do a restart anyway.