Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to install WP-CLI on my Mac using the standard installation command (found here:, yet I am receiving the following error message:

#!/usr/bin/env php

Some settings on your machine make Composer unable to work properly. Make sure that you fix the issues listed below and run this script again:

The detect_unicode setting must be disabled. Add the following to the end of your php.ini: detect_unicode = Off

A php.ini file does not exist. You will have to create one. If you can not modify the ini file, you can also run php -d option=value to modify ini values on the fly. You can use '-d' multiple times.

Installing the main WP-CLI package...

Could not open input file: composer.phar

Installing the Boris package...

Could not open input file: composer.phar

WP-CLI files have been succesfully installed.

To test, run:

/Users/[username]/.composer/bin/wp --info

When I run the test it reports no such file or directory.

I have not installed the bundled PHP that ships with OS X, nor am I using any kind of package. I use MAMP for my local development environment, so my php.ini file is located here:


Can anyone please advise on the best way to get around this error message? Thanks.

share|improve this question
When do you get this error? Is this after you've run I can't see a matching error message and the installer is aware of MAMP being installed in /Applications… – booyaa May 21 '13 at 8:17
yes, I get this error after running curl | bash. I just updated my original post with the full error message. – JP Lew May 21 '13 at 12:56
Do any of the Alternative Install Methods work for you? – Pat J May 21 '13 at 14:22
no, neither of the Alternative Install methods work. In both cases I receive the exact same error message. – JP Lew May 22 '13 at 2:18

1 Answer 1

This question seems to be really old. No Composer involved now a days to install wp-cli. Just curl, chmod, and copy the file as indicated in (:

Now, if anyone wants to add a specific include_path for wp-cli to be aware of (which is how I found this Q) there's 2 options: set a WP_CLI_PHP environment variable OR set include_path in a local php.ini file and modify the wp script to add the -c option after /path/to/php.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.