skip to Main Content

So I’m using AWS with bitnami using a linux terminal for my php application. But I need to switch my PHP version from 7.2 to 5.6, and I can’t figure out how. I’ve never used Linux so I’m having trouble, can anyone help?

I’ve tried this link: https://tecadmin.net/switch-between-multiple-php-version-on-ubuntu/

unfortunately none of those commands worked

If anyone is able to help I’d appreciate it very much!

Thank you!

3

Answers


  1. Bitnami deployments don’t support multiple versions of the same component. You will need to install a different stack, in this case the LAMP 5.6 stack (which is not supported anymore) and deploy your PHP code on top of it as you did in the instance you have.

    You can download the last version of the Bitnami LAMP solution by running these commands

    cd /tmp
    curl -LO "https://downloads.bitnami.com/files/stacks/lampstack/5.6.40-1/bitnami-lampstack-5.6.40-1-linux-x64-installer.run
    chmod +x ./bitnami-lampstack-5.6.40-1-linux-x64-installer.run
    sudo ./bitnami-lampstack-5.6.40-1-linux-x64-installer.run
    

    This new installation will use different ports to configure Apache, MySQL, … if you have another Bitnami installation in the instance. If you want to use the default ports, just stop the default installation.

    sudo /opt/bitnami/ctlscript.sh stop
    sudo mv /opt/bitnami /opt/bitnami.back
    
    Login or Signup to reply.
    1. Backup your current website.
    2. Deploy a new Bitnami WordPress instance.
    3. Update your DNS records.
    4. Install a SSL certificate on new Bitnami WordPress Instance.
    5. Modify the php.ini file to increase upload size.
    6. Import backed up the website on a new Bitnami WordPress website.
    Login or Signup to reply.
  2. First of all you need to install the version of PHP you need so you can run these commands :

    • sudo apt install software-properties-common
    • sudo add-apt-repository ppa:ondrej/php
    • sudo apt update
    • sudo apt install phpx.x (ex : php7.4)
      Then to switch between versions run this :
    • update-alternatives –config php
      now you’ll get to choose you desired PHP version
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search