Upgrading PHP from 8.0 to 8.2 on Apache and Ubuntu

Upgrading PHP from 8.0 to 8.2 on Apache and Ubuntu was easier than I thought, achieved with just five commands:

  1. apt-get update
  2. apt-get install php8.2 php8.2-cli php8.2-common php8.2-mysql php8.2-soap php8.2-bcmath php8.2-xml php8.2-mbstring php8.2-gd php8.2-curl
  3. a2dismod php8.0
  4. a2enmod php8.2
  5. systemctl restart apache2
Published: 9:58 PM GMT · Oct 30, 2023