MyVestaCP: How to install multiple PHP versions in MyVesta Control Panel

By default, the MyVesta Control Panel installs only one version of PHP. The latest build of MyVestaCP comes with PHP 7.3. But if you have a requirement to install multiple PHP versions on the server, you need to do it manually. Here are steps that you can follow to install multiple PHP versions.

  • Find the link to the file multi-php-install.sh on the Github page of MyVestaCP . If they have changed the name of the file, select the new file. Download the file on your server.
wget https://raw.githubusercontent.com/myvesta/vesta/master/src/deb/for-download/tools/multi-php-install.sh
  • Open the bash file multi-php-install.sh in an editor. E.g.
vi multi-php-install.sh
  • Select PHP versions that you want to install on the server by entering 1 for those versions. E.g. Here I have selected PHP 5.6 and 7.2.
#########################################################################
# First enter 1 below for desired PHP versions and then run this script #
#########################################################################

inst_56=1
inst_70=0
inst_71=0
inst_72=1
inst_73=0
inst_74=0
  • Execute the bash file multi-php-install.sh to install your desired PHP versions.
bash multi-php-install.sh
  • Once PHP versions are installed, you can select your desired PHP version while adding a web or a package from the MyVesta control panel.

Similar Posts

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.