Fazer downgrade pho 7.3 para 7.0

  • Posted April 1, 2020
  • PHP

Due to some plugins, I need to downgrade from version 7.3 to 7.0, I tried to do it through htaccess and I was not successful!


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


Usually what I would do in this case is the following:

Add the ondrej PHP repository:

  1. sudo add-apt-repository ppa:ondrej/php

Run apt update:

  1. sudo apt-get update

Install the PHP version that you need:

  1. sudo apt-get install php7.1

Install the required modules:

  1. sudo apt-get install php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-mysql php7.1-mbstring php7.1-mcrypt php7.1-zip php7.1-fpm

Disable PHP 7.3:

  1. sudo a2dismod php7.3

Enable the older PHP version:

  1. sudo a2enmod php7.1
  1. sudo service apache2 restart

Of course this would also depend on your current setup so make sure to take a backup of your Droplet first!