Upgrading between Ubuntu LTS releases can be a nightmare. Even with proper backups, a lot of software and configurations change, and hunting down settings that have broken is extremely time consuming. I suppose that’s why experts say it’s easier to start from scratch. I’ll try that next time.
What happened to me:
- Not all necessary PHP7 mods were installed
- Caching configs did not carry over, so NginX server blocks had to be rewritten. Caching is still not working.
The bulk of what I had to do was to rewrite server blocks to remove some fast-cgi caching and update the nginx configs to use php7 instead of php5:
location ~ \.php$ { include snippets/fastcgi-php.conf; # With php7.0-cgi alone: #fastcgi_pass 127.0.0.1:9000; # With php7.0-fpm: fastcgi_pass unix:/run/php/php7.0-fpm.sock; } (source)
Steps
sudo apt-get install php-cli php-fpm php-mysql
php-curl php-gd php-mbstring php-mcrypt php-xml php-xmlrpc
sudo systemctl restart php7.0-fpm
If php-* doesn’t work, try php7.0-*