PHP 7.1, which has new properties and performance upgrades is available for a while. But most of the distros still does not have the PHP 7.1 packages on the repositories. On this post you will find how to install PHP 7.1. on Debian and Ubuntu.

Attention some plugins or some themes with particular frameworks may not work correctly in WordPress with this new version.

Uninstalling PHP 7.0

If you already have installed PHP 7.0, first you have to uninstall it by typing:

Adding Repository for Ubuntu 14.04 – 16.10

First we have the install add the repository which Ondrej Sury created for PHP 7.1 users.

Addinig Repository for Debian 8

Adding repository to Debian is a bit different. Here are the commands to add the repository to Debian 8:

Now we can install PHP 7.1


With the command below, you can easily install PHP 7.1 with some dependencies, if you will run Nginx as the web server:

Don’t forget to modify your configuration file.


And here is the command for Apache web server:

Leave a Reply

nine + 18 =