I am currently on PHP 7.2.5 but I need 7.3.18. How can I update PHP for my Apache Webserver?

OS (uname -a):

Linux linuxphp7 4.12.14-lp150.12.82-default #1 SMP Tue Nov 12 16:32:38 UTC 2019 (c939e24) x86_64 x86_64 x86_64 GNU/Linux

Apache (httpd -v):

Server version: Apache/2.4.33 (Linux/SUSE) Server built: 2018-03-26 14:17:24.000000000 +0000

enter image description here

  • AFAIK the php7 package (minor version) is bundled with the suse distribution. openSuse Leap 15.1 got php 7.2.x. openSuse Leap 15.2 got php 7.4.x. A SUSE distribution upgrade will upgrade php7 as well. php7.4 will be compatible with php7.3
    – Michael D.
    Jun 17, 2020 at 16:50
  • @MichaelD., but I need a specific PHP version
    – Black
    Jun 18, 2020 at 9:23
  • why wouldn't it work with php7.4?
    – Michael D.
    Jun 18, 2020 at 17:17
  • @MichaelD., because the software I use (magento 2) does not support it yet
    – Black
    Jun 19, 2020 at 8:53
  • No, they recommend php7.4 see devdocs.magento.com/guides/v2.4/install-gde/…
    – Michael D.
    Jun 19, 2020 at 12:14

1 Answer 1


To try version 7.3.19 you have to add the respective repository:

zypper ar https://download.opensuse.org/repositories/devel:/languages:/php:/php73/openSUSE_Leap_15.1/ PHP7-test

zypper ref

zypper in apache2-mod_php7

This should install the newest available version, or you search for all versions before installing:

zypper se -s apache2-mod_php7

Please make sure to always backup your data before changing anything. To specify the desired version run:

zypper in apache2-mod_php7=7.3.19

Not the answer you're looking for? Browse other questions tagged .