I’m running Linux Ubuntu 20.04.
I’m trying to install Mautic, but Mautic keeps giving me an error message saying that their software can’t process PHP 7.4 yet and that I needed to downgrade to 7.2.
What is the best way to do this?
Any support is greatly appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @AaronEsteban1,
You don’t actually upgrade or downgrade PHP versions, you can just install a second one, in your case 7.2.
Anyway, let’s see how to install PHP 7.2
**Centos 8 **
To get started, you need to add EPEL & Remi repository from where you will be able to install PHP 7.2 on CentOS 8 Linux.
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Next once you have the EPEL repository, run:
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
Upon successful addition of EPEL and Remi repositories, execute the command below to get a list of available PHP module streams.
dnf module list php
You should see an output of PHP version. The one we care about is remi-7.2, the latest PHP stream, To enable the module stream run the following :
dnf module enable php:remi-7.2
Once the PHP remi-7.2 module has been enabled, you can then proceed and install PHP
dnf install php php-cli php-common
Ubuntu
sudo apt-add-repository ppa:ondrej/php
Update the repository index.
sudo apt update
Install PHP 7.2 with the below command.
sudo apt install -y php7.2 php7.2-cli php7.2-common php7.2-fpm
To install extensions run
sudo apt install -y php7.2-mysql php7.2-dom php7.2-simplexml php7.2-ssh2 php7.2-xml php7.2-xmlreader php7.2-curl php7.2-exif php7.2-ftp php7.2-gd php7.2-iconv php7.2-imagick php7.2-json php7.2-mbstring php7.2-posix php7.2-sockets php7.2-tokenizer
The above are the standard required extensions. Having said that it’s good to have these extensions as well.
sudo apt install -y php7.2-mysqli php7.2-pdo php7.2-sqlite3 php7.2-ctype php7.2-fileinfo php7.2-zip php7.2-exif
Regards, KFSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.