-1

I am trying to install WP-CLI on my Mac using the standard installation command (found here: http://wp-cli.org), 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:

`/Applications/MAMP/conf/php5.4.4/php.ini`

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

4
  • When do you get this error? Is this after you've run installer.sh? I can't see a matching error message and the installer is aware of MAMP being installed in /Applications github.com/wp-cli/wp-cli.github.com/blob/master/…
    – booyaa
    May 21, 2013 at 8:17
  • yes, I get this error after running curl http://wp-cli.org/installer.sh | bash. I just updated my original post with the full error message.
    – JP Lew
    May 21, 2013 at 12:56
  • Do any of the Alternative Install Methods work for you?
    – Pat J
    May 21, 2013 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, 2013 at 2:18

1 Answer 1

0

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 http://wp-cli.org/ (:

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.

1
  • An alias in ~/.bash_profile to the absolute path will work for some stuff after the chmod.
    – jgraup
    Aug 6, 2016 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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