Why doesn’t WP-CLI work?

Why doesn’t WP-CLI work?

You installed WP-CLI, per the instructions, but when you run it from the command-line, nothing happens:

root@www:/var/www/wordpress# php wp-cli.phar 

…and you see, in /var/log/syslog:

Jan 10 21:36:14 www suhosin[16064]: ALERT - Include filename ('phar://wp-cli.phar/php/boot-phar.php') is an URL that is not allowed (attacker 'REMOTE_ADDR not set', file '/var/www/wordpress/wp-cli.phar', line 4)


You’re running the Apache Suhosin patch, which blocks phar, by default. It needs to be un-blocked. In /etc/php5/cli/php.ini, add:


(no Apache restart needed)

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • StumbleUpon