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?
2
Answers
Just to give you an idea of how you can do it:
Basically, you need to follow two steps:
Install the
7.3
version as you did for7.0
(you can pass the version number to install the exact version number)You need to configure your PHP CLI to use the new version
7.3
instead of7.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
.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 dols