install php7 modules ubuntu
0

A step-by-step guide on the best way to install PHP 7 (stable) on VestaCP, the Ubuntu variation plus couple of test outcomes showing exactly how its performance. We posted the CentOS form of this guide which you are able to read introduction that is short of and should you use it with Vesta control panel for production website or not. But the shortest words I have to say: You better think twice before switching to PHP 7 in production especially if you still don’t know whether your s that are app( is PHP7-compatible currently or perhaps not. But WordPress users need not bother about compatibility problem since the core CMS it self is advertised become PHP7-compatible. But nonetheless, As with major-version language releases that are most, there is still no guarantee that the WordPress theme and plugins you use are compatible. Take your time following this guide to perform some tests before you are going to production.

Read: Install PHP7 on CentOS Vestacp VPS.

While its CentOS version Vestacp is using PHP 5.4.x by default, in its Ubuntu version you can see it is PHP that is using 5.6.x. Therefore inside guide you’ll observe to update PHP 5.6 to PHP 7.0 and exactly how making it assist Vestacp. You can even proceed with the steps that are same you are not Vestacp users.

What you may need

  1. A SSH client like Bitvise or Putty and knowledge that is basic utilizing it.
  2. Basic information about typical Unix demand to SSH towards host.
  3. A host or VPS with at the very least 1GB of RAM (2GB or higher is advised).
  4. Make yes your Vestacp host is set up and operating on Ubuntu host.
  5. About 30 mins of your energy
  6. a walk or tea.

Confused on selecting which VPS provider to set up VestaCP? Browse my suggested VPS providers or top end that is low server providers. Quick recommendation: Digital Ocean, Atlantic.net or Ramnode.

How to Install

p.s: Please click any image you wish to see its larger version.

p.p.s: I run each command as root, non root user need to add sudo prefix.

Step 1 – Install VestaCP on your vps, cloud or dedicated server. The step can be followed by you by action tutorial posted formerly. Regardless of this done that is tutorial Ubuntu 15.10 X that is******************************************************************************************************************************************************************************************************************)( however the actions are practically comparable.

Step 2 – When set up, nevertheless in Putty, you certainly can do check that is initial of PHP version is installed:

php -v

You’ll see something similar to this:

check php version 56

See? It is PHP that is currently running 5.6.( with Zend motor v2.6.0

Step 3 – Now you need to firstly take away the old PHP plus some of its unused things:

apt-get -y purge php5

Step 4 – upcoming, problem this demand you need to add this third-party PPA (Personal Package Archive) from Ondřej Surý, the one who maintains the PHP packages for Debian, and offers a PPA for PHP 7.0 on Ubuntu before you add third-party PPA:

apt-get install python-software-properties

remove php5 ubuntu vesta

Step 5 – Next,. In this situation because PHP7 is not yet available in default Ubuntu’s repo, Ondrej’s PPA helps us. PPAs enable third-party designers to create and circulate packages for Ubuntu not in the channels that are official

add-apt-repository ppa:ondrej/php-7.0
 apt-get update

add ondrej repo ubuntu

aptget update

Step 6 – Then finally you can install PHP7 using ( that is apt-get

apt-get install -y php7.0

install php7 ubuntu

once done, you’ll see similar to this:

done installing php7

Step 7 – Installed! You will check always it agaib utilizing php -v demand:

check php 7 version

Voila! it’s PHP 7.0.1 with Zend motor v3.0.0

Step 8 – to be sure your application (WordPress) can run efficiently, there are lots of other PHP modules you need to install. Usage demand below to see all available php7 modules********) that is:(*******************)apt-cache search php7-*

available php 7 modules

Now install some of it you may think it is necessary:

apt-get install php7.0-common libapache2-mod-php7.0 php7.0-cgi php7.0-cli php7.0-phpdbg php7.0-fpm libphp7.0-embed php7.0-dev php7.0-dbg php7.0-curl php7.0-gd php7.0-imap php7.0-interbase php7.0-intl php7.0-ldap php7.0-mcrypt php7.0-readline php7.0-odbc php7.0-pgsql php7.0-pspell php7.0-recode php7.0-tidy php7.0-xmlrpc php7.0 php7.0-json php-all-dev php7.0-sybase php7.0-modules-source php7.0-sqlite3 php7.0-mysql php7.0-opcache php7.0-bz2

install php7 modules ubuntu

Once done, you’ll see something like this

done install php 7 modules

Step 9 – Do not forget to also start service that is php-fpm this new one:

service php7.0-fpm begin

Step 10 – Delete the old php symblink and produce a brand new one:

rm /usr/bin/php
 ln -s /usr/bin/php7.0 /usr/bin/php

create php7 symblink

Step 11 – Finally, restart Apache webserver:

service apache2 restart

Done!

You can make phpinfo( that are simple page to see some detailed specs:

check php info page

Video Guide

You can watch all steps above in my video to make sure you understand and be confident in following the steps.

What’s in the video:

  • How to create CentOS 7 cloud server in Digital Ocean
  • How to install Vestacp
  • Some basic Vestacp configuration
  • How to upgrade PHP to PHP 70 latest build that is stable
  • How generate database
  • How to set up WordPress
  • PHP 7 + Vestacp performance test

Download the videos:

1-Create VPS-Install-Vestacp.mkv

2-Setup-Vestacp-Install-PHP7.mkv

3-Install-Wordpress.mkv

4-Setup-WordPress-Test-Site.mkv

5-Loader-IO-Test.mkv

6-GTM-Pingdom-LoadImpct.mkv

PHP 7.0 Efficiency Test

we installed Vestacp + PHP 7.0 in a sub directory, set up WordPress (v4.4) utilizing Twenty Sixteen theme, and uploaded the full of dummy content about it (dummy content credits to WPTest.io). We utilized Digital Ocean droplet with 1GB of RAM + 1 processor core operating Ubuntu 15.10 x64. The test done utilizing account that is free of server speed test services including Loader.io and LoadImpact.com.

GTMetrix Performance Test

gtmetrix test result php7

Page speed score and Page load time are better than its CentOS version.

Pingdom Speed Test

pingdom php7 speed test

Load time is much faster than its CentOS version, less than 1 second.

Loader.IO

Test #1 – Clients per second test model with 10 clients per second over 1 minute duration (or equal with 864,000 unique visitors per day):

loaderio test 1a

loaderio test 1b

Result: The server can operate and serve request normally at that level of test while average response time is 968 ms with 167 ms minimal and 2349 ms max. There is no 500 server error code. Again, I don’t know why but it is faster than its CentOS version.

LoadImpact.IO

Test #1 – 50 unique users for 5 minutes duration (equal with 14,400 UV/day):

loadimpact result php7 ubuntu

loadimpact result php7 ubuntu b

Result: LoadImpact count page load time not response time. The load time that is slowest is around 300 ms even though the quickest one is 124 ms. As through the chart above, it is constantly below 200 ms.

My Verdict

PHP7 is considered the most release that is anticipated of PHP which is said much faster than PHP 5.x. In some benchmark tests PHP7 is proven almost as fast as HHVM. If my test above was correct, using Vestacp + PHP7 on Ubuntu VPS with 1GB of RAM, it can handle around 800k UV/day if you run a WordPress blog with WP Super Cache installed. However, real result that is live differ.

How exactly to Install Snipe-IT on Ubuntu 16.04

Previous article

Just how to Install Webuzo on Ubuntu 15.04 VPS

Next article

You may also like

Comments

Leave a reply

Your email address will not be published. Required fields are marked *