I’ve tended to shy away from upgrading Debian web servers in place, and I’m not sure why. Here’s how to upgrade to a newer distribution safely. I’m running the LAMP stack. The process will differ slightly with Nginx. My experience is all with Apache.
It takes around 5 minutes to upgrade a Debian LAMP server from an older version to the current version. Plan on running about eight commands; five to upgrade and three to enable the new PHP version.