Upgrading php from 7.2 to 7.4

Support intro

Can someone please refer me to a guide to upgrade php to 7.4 on an “existing” instance?

  • You are currently running PHP 7.2.24-0ubuntu0.18.04.7. Upgrade your PHP version to take advantage of performance and security updates provided by the PHP Group as soon as your distribution supports it.
  • Nextcloud 20 is the last release supporting PHP 7.2. Nextcloud 21 requires at least PHP 7.3.
  • This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them.
    bcmath gmp

Operating system: Linux 4.15.0-139-generic #143-Ubuntu SMP Tue Mar 16 01:30:17 UTC 2021 x86_64

Webserver: Apache/2.4.29 (Ubuntu) (apache2handler)

Database: mysql 5.7.33

PHP version: 7.2.24-0ubuntu0.18.04.7

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, apache2handler, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, intl, json, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 19.0.9 -

Thanks in advance!


Upgrade Nextcloud from version 19 to current 20 stable release. Then you should be able to migrate to a more recent release of php as well.

The solution for me ended up being just doing an in-place upgrade of Ubuntu 18 to 20.