Upgrade PHP version to 7.1.5


Hello, i am trying to update php version with:

sudo apt-get install php7.1

but i get this message:

user is not in the sudoers file. This incident will be reported.

How can i fix this?


Cloudways is a managed hosting solution, and that means they are the ones managing the servers and configuration. So, you can’t do this.

We’ll have to wait for them to upgrade and deploy the new version to all of their servers.


There is a way to update the PHP version on your servers.

Steps are below:

  1. Login to your Cloudways portal.
  2. Select the server you want to update PHP on.
  3. Select (Settings & Packages)
  4. Select the Packages Tab.
  5. Click the Pencil to the right of PHP.
  6. Click the down arrow and select the new PHP 7.1 Version.
  7. Click save and wait, This will apply the latest version of PHP they have available for there servers.

Always make sure to take a snapshot of your server before any major changes.



Hi @pedro.brandao,

You can change the PHP versions between 5.6, 7.0, and 7.1 as @westlow suggested.

You can also follow our KB: https://support.cloudways.com/how-to-upgrade-to-php-7/