Categories: Cpanelphp

Run composer with different PHP version

If multiple PHP versions are installed on your server you need to tell the composer which PHP version to be used.

 

The below commands tell the composer to use PHP version 7.4.

alias php="/opt/cpanel/ea-php73/root/bin/php"
alias composer="/opt/cpanel/ea-php73/root/bin/php /opt/cpanel/composer/bin/composer"

Notes:
The is a Cpanel server and the path mentioned above are for the Cpanel server only. If you use custom PHP, use the correct path accordingly.

Hosting Ahead

Recent Posts

How to Install WordPress using WordPress Toolkit in cPanel

Wordpress toolkit allows the installation, configuration, and management of Wordpress. The first step is to…

3 years ago

Configure OpenVPN Client Devices for Andriod

These instructions cover installing and configuring the OpenVPN Connect app  Client-Side Configurations: Android There are…

3 years ago

The certificate chain was issued by an authority that is not trusted | SQL Server

This error may appear when you try to connect to Microsft SQL server or you…

4 years ago

Free website hosting support in this COVID pandemic

Hello everyone, The COVID-19 should have affected almost everyone in a way or another. When…

4 years ago

Amazon workspaces to build a secure work from home cloud infrastructure

Based on the current Covid19 scenario, several companies asked employees to work from home. Google…

4 years ago

How to disable Mod Security on Cpanel Server

ModSecurity is an open-source web application firewall that protects your websites from attacks. There are…

5 years ago