Easy way to update PHP on Amazon Linux 2

Sep 10, 2020 PHP AWS EC2 Upgrade Amazon Linux2

People who have installed PHP using Amazon Linux Extra of Amazon Linux 2 for the past year or so can update PHP quite easily just by disabling & enabling the package with Amazon Linux Extra. is.

Reference: How to update php on Amazon linux 2(Thanks!)

#My environment


  1. Disable Amazon Extra PHP7.1: $ sudo amazon-linux-extras disable php7.1
  2. Enable Amazon Extra PHP7.3: $ sudo amazon-linux-extras enable php7.3
  3. sudo yum update ――Actually, only PHP should be updated, but since it is development, I ran it all together. If it’s a production environment, should I just select PHP and run it to update? –Example: sudo yum update php *