Upgrading Ubuntu 14.04 to 16.04

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

  1. Follow DO guide
  2. Upgrade kernel
  3. Confirm settings regarding PHP
  4. Install mods
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-*

 

 

Photo by DudeOmega cc