Upgrading to debian 10
This upgrade is only necessary for folks on the develop branch or otherwise using PHP 8.1 and debian 9, since it is no longer supported. If you're not on the develop branch, you most likely do not need this upgrade.
Before performing any type of upgrade, you must backup your entire website files and database. If you are on Digital Ocean, you can easily do this by creating a snapshot of your droplet.
1. Open the sources.list file and change any reference of "stretch" to "buster"
sudo nano /etc/apt/sources.list
deb http://deb.debian.org/debian debian buster main deb http://deb.debian.org/debian buster-updates main deb http://deb.debian.org/debian buster/updates main
There may be several packages listed here. Make sure to change all of them. When you are done, save the file by pressing Ctrl + X and Y to save.
2. Navigate to the php.ini file contained in your PHP folder and replace any reference of "stretch" to "buster", as you did above.
3. Perform the following commands in order to upgrade:
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo reboot
The last command will disconnect you from the server. Relaunch Putty and log back in.
4. Verify that the upgrade has completed by running the following command:
Confirm that your distribution now shows as "Debian GNU/Linux 10 (buster)"
5. Remove outdated packages by performing the following command:
sudo apt --purge autoremove
That's it! Everything should now be working with the upgraded distro.