How to install Drupal on PHP7 and Upgrade Server on Ubuntu

    Follow these steps:
    Step 1: sudo add-apt-repository ppa:ondrej/php-7.0

    Step 2: sudo apt-get update
    With Apache:
    Step 3: sudo apt-get install php7.0

    Step 4: sudo apt-get install php7.0-mysql

    Step 5: sudo service apache2 restart
    With Nginx PHP-FPM
    Step 3: sudo apt-get install php7.0-fpm

    Step 4: sudo apt-get install php7.0-mysql

    Step 5: sudo nano /etc/nginx/sites-enabled/default

    Change fastcgi_pass unix:/var/run/php5-fpm.sock; to  unix:/var/run/php/php7.0-fpm.sock;

    Step 6: sudo service nginx restart
    After Above steps check
    php -v
    Additional Steps for drupal Installation: Note: take backup of all tables before running below commands Backup Process:
    mysqldump --lock-all-tables -u root -p --all-databases > backup.sql
    Update MySQL Above 5.5.3
    Step 1: sudo apt-get purge mysql-server*

    Step 2: sudo apt-get install mysql-server-5.6
    Restore after upgrade:
    mysql -u root -p < backup.sql
    Install GD library
    sudo apt-get install php7.0-gd
    Give Permissions:
    chmod o+w sites/default

    Copy default.settings.php to create settings.php

    cp sites/default/default.settings.php sites/default/settings.php

    chmod o+w sites/default/settings.php
    Restart Apache/Nginx sudo service apache2/nginx restart sudo apt-get update sudo apt-get install php7.0-gd
    5
    Average: 5 (1 vote)