Siteground has recently announced that PHP 7, along with OpCache is now available on all their shared hosting services.
Siteground are constantly striving to bring the latest technologies to their hosting products, and a few months ago introduced HHVM to their Cloud Hosting. HHVM is based on the HipHop Virtual Machine which was pioneered by Facebook to significantly increase PHP performance. PHP 7 is slated to become a direct competitor performance wise to HHVM, and indeed some benchmark tests already suggest PHP 7 is faster.
In addition, with the OpCache caching available at Siteground, along with their Supercacher technology (Nginx (static + dynamic cache) + Memcache) we believe that once PHP 7 goes mainstream they will be hard to beat in terms of performance. Actually, we lie… with their Supercacher technology, they already are hard to beat. You can read more about all the other benefits of Siteground, including their fast support and developer features) here.
How to activate PHP 7 at Siteground
Activating PHP 7 at Siteground is very easy. You can activate it either via the cPanel control panel, or by adding a line to your .htaccess file.
To activate via the cPanel you can follow the instructions below:
1. Click the PHP Version Manager Icon in cPanel
2. Select the directory you wish to activate PHP 7
With Siteground you can have different directories use different PHP versions. As such you need to select the specific directory, or if you wish the whole account to use the selected PHP version click the public_html link as shown below:
3. Choose your PHP Version
On the next screen you will be able to choose PHP 7.0.0 beta 3 to enable PHP 7 for your account \ directory.
Once selected, click save and you will get the following confirmation that PHP 7 is now active:
Alternatively, add this code to your .htaccess file to enable PHP 7
AddHandler application/x-httpd-php70 .php .php5 .php4 .php3
Note that this settings will apply to all sub directories. If you have sub directories that you wish to use a different PHP version you can add the relevant code in a new .htaccess file within that directory.
The PHP 7 OpCache functionality is enabled by default. The files for the OpCache are stored in the following directory:
At the present time, clearing the OpCache is not integrated within their Supercacher plugin. This means that to clear the cache you must delete the whole .opcache directory manually.
PHP 7 is in Beta – That means issues are expected
Siteground are very clear to warn that PHP 7 is still in Beta. This means you should not use it on a live (production) site, and that there may be some compatability issues with your website in the short term.
Whilst Siteground state that they have tested PHP with default versions of WordPress, Joomla and Drupal it is possible that various themes \ plugins will not be compatible due to several PHP functions being depreciated within PHP 7.
In addition, Memcache is not yet compatible with PHP 7, so if you are using Siteground’s Supercacher then you will need to disable the Memcache option. Hristo Pandjarov stated that they are working on a patch for this:
Grab 60% Off SiteGround hosting and try it out
If you want to test out PHP 7 you can currently get up to siteground coupons.
If you wish to know more about Siteground, you can check out our Siteground review, our article about their developer features (GoGeek plan), or this article about their Supercacher & with Nginx Update.
In addition, you can read up on some benchmark tests between PHP 5.6, HHVM and PHP 7 here.