Home > Software engineering >  how to upgrade from php 7.0 to php 7.3 on Debian 9.1
how to upgrade from php 7.0 to php 7.3 on Debian 9.1

Time:01-18

I have a Debian 9.1 droplet on DigitalOcean. 1GB Memory, 30GB Disk.

I've previously installed php 7.0 using apt install php php-fpm

I also ran the following commands to install php modules: apt-get install php-mysql apt-get install php-curl apt-get install php-zip apt-get install php-apcu apt-get install php-xml

How do I now upgrade from 7.0 to 7.3?

CodePudding user response:

Just to give you an idea of how you can do it:

Basically, you need to follow two steps:

  1. Install the 7.3 version as you did for 7.0 (you can pass the version number to install the exact version number)

  2. You need to configure your PHP CLI to use the new version 7.3 instead of 7.0.

The above steps can be done for every version.

Here is documentation of how you can do it in case of migration from 7 to 8.

NOTE: The documentation will help you to install a version of PHP and configure CLI so you need to make sure to do the updates as per 7.3.

CodePudding user response:

sudo-apt update
sudo apt-get install php-fpm

This will go try to update it if see you already have php-fpm... Your repository should be updated to understand there is new version of php that is available for download

you can also remove & purge it and try to download it again...

but also consider some services needs to be updated and set to use last version of php that is currently installed... Like Nginx ,in that you should update for .conf file to read php 7.3 or any installed versions

you can also check how many versions php do you have by going to directory by this command cd /etc/php and do ls

  • Related