Use Website PHP.ini with Composer

Some websites require a custom php.ini file due to default settings for a server. Therefore, some tasks will require you to specify to use that custom php.ini file path instead of the server default. For example, shared hosting users may use this method when software follows the server php settings by default. You can view such info in your phpinfo.php file. Below we’ll use Composer with the php.ini file of a specific website.

Use Website PHP.ini

  1. Log into SSH.
  2. Type the Composer command:
    php -c [path-to-php.ini] [path-to-composer] [composer-options]

    For example:
    php -c /home/cpaneluser/public_html/php.ini /opt/cpanel/composer/bin/composer update

Browse our Support Center to learn more about web design with PHP and PHP configuration.


It looks like this article doesn't have any comments yet - you can be the first. If you have any comments or questions, start the conversation!

Was this article helpful? Let us know!