Title: CLI &#8211; Package install
Last modified: February 18, 2019

---

# CLI – Package install

 *  Resolved [robguay](https://wordpress.org/support/users/robguay/)
 * (@robguay)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/cli-package-install/)
 * Hello:
    First let me say “Awesome Sauce!” I just ran into wp-cli yesterday. Wow,
   what a useful and powerful tool. I have only had a few hours of sleep learning
   how to install it and use the parts or per-installed packages or commands. Because
   I am using a shared hosting, cPanel, server there are restrictions I have learned
   to work around.
 * Here is the debug report or part of it, the important part:
 *     ```
       ***************************************************
       ********    DEBUG REPORT              *************
       ***************************************************
       wp package install wp-cli/admin-command --debug
       Debug (bootstrap): Fallback autoloader paths: phar://wp-cli.phar/vendor/autoload.php (0.016s)
       Debug (bootstrap): Loading detected autoloader: phar://wp-cli.phar/vendor/autoload.php (0.017s)
       Debug (commands): Adding command: cache (0.026s)
       Debug (commands): Adding command: transient (0.03s)
       Debug (commands): Adding command: comment (0.037s)
       Debug (commands): Adding command: meta in comment Namespace (0.04s)
       Debug (commands): Adding command: menu (0.041s)
       Debug (commands): Adding command: item in menu Namespace (0.045s)
       Debug (commands): Adding command: location in menu Namespace (0.046s)
       Debug (commands): Deferring command: network meta (0.046s)
       Debug (commands): Adding command: option (0.053s)
       Debug (commands): Adding command: post (0.067s)
       Debug (commands): Adding command: meta in post Namespace (0.07s)
       Debug (commands): Adding command: term in post Namespace (0.072s)
       Debug (commands): Adding command: post-type (0.073s)
       Debug (commands): Adding command: site (0.079s)
       Debug (commands): Adding command: meta in site Namespace (0.081s)
       Debug (commands): Adding command: option in site Namespace (0.084s)
       Debug (commands): Adding command: taxonomy (0.086s)
       Debug (commands): Adding command: term (0.092s)
       Debug (commands): Adding command: meta in term Namespace (0.095s)
       Debug (commands): Adding command: user (0.105s)
       Debug (commands): Adding command: meta in user Namespace (0.109s)
       Debug (commands): Adding command: session in user Namespace (0.111s)
       Debug (commands): Adding command: term in user Namespace (0.112s)
       Debug (commands): Adding command: network (0.113s)
       Debug (hooks): Processing hook "after_add_command:network" with 1 callbacks (0.113s)
       Debug (hooks): On hook "after_add_command:network": Closure in file phar:///home/sirroberts/wp-cli.phar/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 624 (0.113s)
       Debug (commands): Adding command: meta in network Namespace (0.115s)
       Debug (commands): Adding command: db (0.144s)
       Debug (commands): Adding command: plugin (0.165s)
       Debug (commands): Adding command: theme (0.174s)
       Debug (commands): Adding command: mod in theme Namespace (0.176s)
       Debug (commands): Adding command: scaffold (0.19s)
       Debug (commands): Adding command: core (0.191s)
       Debug (commands): Adding command: verify-checksums in core Namespace (0.193s)
       Debug (commands): Adding command: verify-checksums in plugin Namespace (0.194s)
       Debug (commands): Adding command: export (0.198s)
       Debug (commands): Adding command: config (0.207s)
       Debug (commands): Adding command: core (0.219s)
       Debug (commands): Adding command: eval (0.22s)
       Debug (commands): Adding command: eval-file (0.221s)
       Debug (commands): Adding command: import (0.225s)
       Debug (commands): Adding command: media (0.235s)
       Debug (commands): Adding command: package (0.244s)
       Debug (commands): Adding command: cron (0.245s)
       Debug (commands): Adding command: event in cron Namespace (0.251s)
       Debug (commands): Adding command: schedule in cron Namespace (0.252s)
       Debug (commands): Adding command: embed (0.253s)
       Debug (commands): Adding command: fetch in embed Namespace (0.258s)
       Debug (commands): Adding command: provider in embed Namespace (0.264s)
       Debug (commands): Adding command: handler in embed Namespace (0.266s)
       Debug (commands): Adding command: cache in embed Namespace (0.27s)
       Debug (commands): Adding command: i18n (0.271s)
       Debug (commands): Adding command: make-pot in i18n Namespace (0.277s)
       Debug (commands): Adding command: make-json in i18n Namespace (0.279s)
       Debug (commands): Deferring command: language core (0.28s)
       Debug (commands): Deferring command: language plugin (0.281s)
       Debug (commands): Deferring command: language theme (0.282s)
       Debug (hooks): Immediately invoking on passed hook "after_add_command:site": Closure in file phar:///home/sirroberts/wp-cli.phar/vendor/wp-cli/language-command/language-command.php at line 37 (0.282s)
       Debug (commands): Adding command: switch-language in site Namespace (0.282s)
       Debug (commands): Adding command: language (0.283s)
       Debug (hooks): Processing hook "after_add_command:language" with 3 callbacks (0.283s)
       Debug (hooks): On hook "after_add_command:language": Closure in file phar:///home/sirroberts/wp-cli.phar/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 624 (0.283s)
       Debug (commands): Adding command: core in language Namespace (0.285s)
       Debug (hooks): On hook "after_add_command:language": Closure in file phar:///home/sirroberts/wp-cli.phar/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 624 (0.285s)
       Debug (commands): Adding command: plugin in language Namespace (0.288s)
       Debug (hooks): On hook "after_add_command:language": Closure in file phar:///home/sirroberts/wp-cli.phar/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 624 (0.288s)
       Debug (commands): Adding command: theme in language Namespace (0.291s)
       Debug (commands): Adding command: rewrite (0.293s)
       Debug (commands): Adding command: rewrite (0.295s)
       Debug (commands): Adding command: cap (0.297s)
       Debug (commands): Adding command: role (0.299s)
       Debug (commands): Adding command: search-replace (0.307s)
       Debug (commands): Adding command: server (0.309s)
       Debug (commands): Adding command: shell (0.31s)
       Debug (commands): Adding command: super-admin (0.311s)
       Debug (commands): Adding command: widget (0.314s)
       Debug (commands): Adding command: sidebar (0.315s)
       Debug (bootstrap): Adding framework command: phar://wp-cli.phar/vendor/wp-cli/wp-cli/php/commands/cli.php (0.315s)
       Debug (commands): Adding command: cli (0.323s)
       Debug (commands): Adding command: cache in cli Namespace (0.324s)
       Debug (bootstrap): Adding framework command: phar://wp-cli.phar/vendor/wp-cli/wp-cli/php/commands/help.php (0.324s)
       Debug (commands): Adding command: help (0.325s)
       Debug (bootstrap): No readable global config found (0.325s)
       Debug (bootstrap): No project config found (0.325s)
       Debug (bootstrap): argv: /home/sirroberts/wp-cli.phar package install wp-cli/admin-command --debug (0.325s)
       Debug (bootstrap): ABSPATH defined: / (0.326s)
       Debug (hooks): Processing hook "before_run_command" with 1 callbacks (0.326s)
       Debug (hooks): On hook "before_run_command": WP_CLI\Bootstrap\RegisterDeferredCommands->add_deferred_commands() (0.326s)
       Debug (bootstrap): Running command: package install (0.326s)
       Installing package wp-cli/admin-command (dev-master)
       Updating /home/sirroberts/.wp-cli/packages/composer.json to require the package...
       Using Composer to install the package...
       ---
       Loading composer repositories with package information
       Updating dependencies
       Reverted composer.json.
       WP-CLI ran out of memory. Please see https://bit.ly/wpclimem for further help.
   
       ***************************************************
       ********    END OF REPORT             *************
       ***************************************************
   
       As you see the composer now requires the package (wp-cli/admin-command) it failed to install.
   
       Another error I have received installing packages
       error: Warning: Content-Length mismatch, received 163577 bytes out of the expected 675165
   
       ***************************************************
       ********    Possible solution         *************
       ***************************************************
   
       I tried adding the following code to the “.composer/config.json” to correct the issue.
       {
           "config": {
           "github-protocols": [
           "https"
       ]
       },
           "repositories": {
           "packagist.org": {
           "type": "composer",
           "url": "https://packagist.org"
       }}}
   
       No luck.
   
       ***************************************************
       ********    Another possible sulution *************
       ***************************************************
       Godaddy restricts editing of the php.ini file so
       I added a user.ini file with the following entry. 
   
       max_input_vars = 5000
   
       Again no luck
       ***************************************************
   
       ***************************************************
       ********    Another possible sulution *************
       ***************************************************
   
       $ php -d memory_limit=512M "$(which wp)" package install wp-cli/admin-command
   
       ***************************************************
       ********    HELP Info       ***********************
       ***************************************************
   
       <a href="https://make.wordpress.org/cli/handbook/common-issues/#php-fatal-error-allowed-memory-size-of-999999-bytes-exhausted-tried-to-allocate-99-bytes" rel="noopener noreferrer" target="_blank">Help reference</a>
   
       ***************************************************
       ********    wp-cli info       *********************
       ***************************************************
       wp --info
       OS:     Linux p3plcpnl0758.prod.phx3.secureserver.net 2.6.32-896.16.1.lve1.4.54.el6.x86_64 #1 SMP Wed May 2 07:43:19 EDT 2018 x86_64
       Shell:  /bin/bash
       PHP binary:     /opt/alt/php56/usr/bin/php
       PHP version:    5.6.36
       php.ini used:   /opt/alt/php56/etc/php.ini
       WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
       WP-CLI vendor dir:      phar://wp-cli.phar/vendor
       WP_CLI phar path:       /home/sirroberts
       WP-CLI packages dir:    /home/sirroberts/.wp-cli/packages/
       WP-CLI global config:
       WP-CLI project config:
       WP-CLI version: 2.1.0
   
       ***************************************************
       ***************************************************
       TRICK TO SUCCESSFULLY INSTALL ON A SHARED GODADDY SERVER
       ***************************************************
       ***************************************************
   
       Install wp-cli
       $ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
   
       Give the proper permissions
       $  chmod +x wp-cli.phar
   
       Test to make sure it is working
       $  php wp-cli.phar --info
   
       ***Create an alias in your .bashrc so you can just use wp in your terminal commands***
       $  echo "alias wp='~/wp-cli.phar'" >> .bashrc
   
       Refresh that file
       $  source .bashrc
   
       if you test this out inside a wordpress install, you should see it working
       $  wp plugin list
   
       <hr>
       Installing packages
       -------------------
       ```
   
 * Thanks
    -  This topic was modified 7 years, 3 months ago by [robguay](https://wordpress.org/support/users/robguay/).
      Reason: Correct grammar and add the full debug report
    -  This topic was modified 7 years, 3 months ago by [robguay](https://wordpress.org/support/users/robguay/).
      Reason: Add comments about error
    -  This topic was modified 7 years, 3 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcli-package-install%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [robguay](https://wordpress.org/support/users/robguay/)
 * (@robguay)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/cli-package-install/#post-11224053)
 * [https://make.wordpress.org/cli/handbook/common-issues/#php-fatal-error-allowed-memory-size-of-999999-bytes-exhausted-tried-to-allocate-99-bytes](https://make.wordpress.org/cli/handbook/common-issues/#php-fatal-error-allowed-memory-size-of-999999-bytes-exhausted-tried-to-allocate-99-bytes)
 * If you use cPanel
    cPanel >> Select PHP version >> Switch To PHP Options
 * change memory_limit –> 512M
 * SUCCESS

Viewing 1 replies (of 1 total)

The topic ‘CLI – Package install’ is closed to new replies.

## Tags

 * [cli](https://wordpress.org/support/topic-tag/cli/)
 * [command](https://wordpress.org/support/topic-tag/command/)
 * [putty](https://wordpress.org/support/topic-tag/putty/)
 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 1 participant
 * Last reply from: [robguay](https://wordpress.org/support/users/robguay/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/cli-package-install/#post-11224053)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
