Upgrading PHP (Ubuntu with Apache)

Опубликовано: 09 Октябрь 2024
на канале: Susan B.
2,360
37

How to upgrade PHP on an Ubuntu server running Apache. For my example, I’ll do a PHP 8.0 → 8.2 upgrade, but you should be able to apply the same general principles to other version jumps. As part of the process, I'll also share a helpful script you can use to make sure setting changes in your php.ini config file are kept in sync across your different PHP versions.

NOTES: https://codewithsusan.com/notes/upgra...

php.ini diff script:
https://gist.github.com/susanBuck/17d...

Upgrading PHP on an Nginx server:
   • Upgrading PHP (Ubuntu with Nginx)  

=== CHAPTERS ===
00:00 Introduction
00:32 Output phpinfo with server info
01:14 Record current PHP-related packages
01:47 Add repository where we’ll get the updates from
02:15 Install upgrades
03:35 Configure server to use upgraded PHP
05:24 Confirm it worked
05:57 Synchronize PHP configs

=== RELATED VIDEOS ===
Remote Development with VSCode (SSH)
   • Remote Development with VSCode (SSH)  

PHP Configuration - Locating and Editing php.ini (Apache, Nginx, PHP FPM)
   • PHP Configuration - Locating and Edit...  

=== PRODUCTS I USE ===
Microphone: https://amzn.to/3ZRPdvb
Microphone windscreen: https://amzn.to/3ZRPdvb
(paid links)