Skip to content

Instantly share code, notes, and snippets.

@jazlopez
Last active December 24, 2015 20:58
Show Gist options
  • Save jazlopez/3ae006711945aeac57d8 to your computer and use it in GitHub Desktop.
Save jazlopez/3ae006711945aeac57d8 to your computer and use it in GitHub Desktop.
Step by Step for updagrading PHP 7 from previous version.

HOW TO upgrade to PHP 7 from PHP 5.x

Please notice

  • Take into consideration this may break old legacy applications.
  • Syntax changes may be required for old legacy applications.
  • Therefore do not run this in production environment.
  • Instead you need to consider creating a test enviroment using the below instructions.
  • Ubuntu 14.x does not include PHP7 by default. There is not a fixed date on when Ubuntu will include PHP 7 in the official repository.
  • My webserver of choice is nginx over apache. No problem so far using nginx.
  • If you run into problems please read the output from error.
  • Usually the output contains the fix for the error.

Instructions


  1. sudo apt-get install python-software-properties
  2. sudo add-apt-repository ppa:ondrej/php-7.0
  3. sudo apt-get update
  4. sudo apt-get purge php5-fpm
  5. sudo apt-get install php7.0 php7.0-fpm php7.0-mysql
  6. sudo apt-get --purge autoremove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment