PHP 7 + OpCache Now Available On All Shared SiteGround Servers

php72

UPDATE: PHP 7.0 has Memcached support which you can use for object caching. If you’re using our SiteGround Optimizer plugin, it will automatically use the appropriate drop-in.

HHVM has significantly changed the way PHP sites are optimized for performance. Right now it is probably the fastest stable execution engine for PHP scripts. However, with PHP 7 on the horizon things may change and HHVM may face a serious competitor as according to some benchmarking tests and those disclosed by Zend, PHP 7 is much faster than HHVM.

Important: Even though it’s stable, PHP 7.0 is still in beta and it’s not recommended that you use it on live websites. In addition, it does not yet have Memcache support which means that if you want to use the SuperCacher and PHP7, you need to disable the Memcache option from the plugin backend before switching to PHP7.

Why Should You Use PHP 7?

The main advantage of PHP 7 is that it is much faster than any of the available PHP 5.x releases. The fact that PHP 7 provides opcode caching by default is the main reason for the performance improvements provided by PHP 7.

How To Activate PHP 7 on a SiteGround server?

Here at SiteGround we believe that our clients should have access to the latest technologies as soon as those technologies are stable enough for secure usage. That is why we have added the latest PHP 7 beta version to all our servers.

You can activate PHP 7 directly from the PHP Version Manager in cPanel or by adding a line in your .htaccess file. The PHP 7 OpCache functionality is enabled by default. The folder which is used by PHP 7 to store the opcache is:

code

If you want to clear the cache you can simply delete the whole .opcache directory.

Are Any Issues Expected?

We have tested default installations of some of the most popular apps (WordPress, Joomla!, Drupal, etc.) and we did not notice issues. However, as PHP 7 is the largest shift in PHP technology since the upgrade to PHP 5.3, issues will occur for sure. In PHP 7 many things have been changed and some functions have been deprecated so developers may check this article by Cal Evans from Zend for more information about the backwards compatibility issues that could occur.

Access email sent!

Sign Up For
More Awesome Content!

Subscribe to receive our monthly newsletters with the latest helpful content and offers from SiteGround.

Thanks!

Please check your email to confirm your subscription.

author avatar

Daniel Kanchev

Director Product Development

Daniel is responsible for bringing new products to life at SiteGround. This involves handling all types of tasks and communication across multiple teams. Enthusiastic about technology, user experience, security and performance, you can never be bored hanging around him. Also an occasional conference speaker and travel addict.

Comments ( 43 )

author avatar

Nicolas F

Aug 27, 2015

Thanks for letting us try PHP 7 ! :-) I tried it on a WordPress blog. It works great, but maybe you should warn user to delete the SiteGround CachePress plugin before activating PHP 7. You have to delete the plugin and the /wp-content/object-cache.php file to make it work. So far, speed seems great, I'll keep a close eye on performances for a couple of days.

Reply
author avatar

Hristo Pandjarov Siteground Team

Aug 27, 2015

Don't delete the plugin! Simply disable the Memcache option - PHP7 does not support Memcache yet :(

Reply
author avatar

Barbara L

Sep 11, 2015

If I delete the plugin will my website work properly?

Reply
author avatar

Hristo Pandjarov Siteground Team

Sep 12, 2015

Yes, if you delete the droplet and there aren't any other problems, it should work. But don't delite the entire SG CachePress plugin, just disable the Memcache option. We're working on a patch for that at the moment so we will make it available with PHP 7 shortly.

Reply
author avatar

Matteo

Aug 28, 2015

this sentence is completely wrong "The fact that PHP 7 provides opcode caching by default is the main reason for the performance improvements provided by PHP 7." PHP7 is faster than previous versions thanks to the new AST, memory optimisation and old code cleanup. All the benchmarks against php 5.5 and 5.6 had the opcache active, therefore how come php7 becomes faster by turning it on?

Reply
author avatar

Marina Yordanova Siteground Team

Sep 01, 2015

Hello Matteo, you are right, but we at SiteGround haven't been providing opcode caching in particular for PHP so far. This is why we say that in our point of view PHP 7 is much faster. Regards!

Reply
author avatar

Rishi

Aug 29, 2015

So glad SiteGround is giving customers the options that other shared hosts don't. Glad I switched! :-)

Reply
author avatar

Marina Yordanova Siteground Team

Sep 01, 2015

Thank you for the kind words! Glad to have you on board :)

Reply
author avatar

John

Aug 29, 2015

Joomla 3.4 is not compatible with PHP7. Will have to wait for Joomla 3.5. http://forum.joomla.org/viewtopic.php?f=706&t=893799

Reply
author avatar

John

Aug 29, 2015

correct link http://forum.joomla.org/viewtopic.php?f=706&t=893799&view=previous https://github.com/joomla/joomla-cms/issues/7571

Reply
author avatar

Marina Yordanova Siteground Team

Sep 01, 2015

Our techs have tested the installation of the latest Joomla in general. They haven't tested specific functionalities of the website. The main idea of the post is to make more people aware that PHP 7 beta is already available on our servers, and if their current host does not offer it yet - they are welcome to test it out with us, and find out how it's working for them. Regards!

Reply
author avatar

Coregenie

Aug 31, 2015

Hi Do you allow this in PHP 7 + OpCache wordpress hosting? ~With Regards Coregenie Web Desigх

Reply
author avatar

Marina Yordanova Siteground Team

Sep 01, 2015

Yes, you can try out PHP 7 + OpCache on our WordPress hosting. Just change the PHP version from your cPanel. Regards!

Reply
author avatar

Victor Ekpott

Sep 08, 2015

Your home page says our customers loves us. Well, I love you. Siteground has removed the headache of thinking about the host and your application. You guys are models for other hosting companies.

Reply
author avatar

Hristo Pandjarov Siteground Team

Sep 08, 2015

Thank you for the kind words!

Reply
author avatar

Imoleayo Ogunbekun

Sep 10, 2015

Being a startup web developer from Nigeria, Siteground has helped me look bigger in the presence of my clients, I wouldnt recommend any other web host, Site uptime, speed, Customer care all very solid.... the learning platform and the awesome backup retrieval when i crash everything. Thank you a zilion.

Reply
author avatar

Hristo Pandjarov Siteground Team

Nov 30, 2015

Thanks for the kind words, it's always a pleasure to hear from a happy customer!

Reply
author avatar

Enrico

Sep 11, 2015

I am now using PHP 7 beta 3 and apparently it is working fine but I don''t see performance improvement. Now there is already PHP 7 RC 2 and on September 17, it will be released PHP 7 RC 3. PHP 7 Beta 3 is already two version old, when do you plan to give us a newer version of PHP 7 ? Thank you Enrico

Reply
author avatar

Hristo Pandjarov Siteground Team

Sep 12, 2015

It takes time to implement a new PHP version on a big hosting structure like ours :) However, we will make a newer version available very soon.

Reply
author avatar

Tony

Sep 17, 2015

Is php-7 compatible with Moodle 2.92? Thank you.

Reply
author avatar

Hristo Pandjarov Siteground Team

Sep 23, 2015

According to the official Moodle documentation 2.92 does not support PHP7.

Reply
author avatar

Roma

Sep 17, 2015

I've been with many other hosting companies but I did not last long and for a lot of technical and features reasons which Siteground resolved! I am not moving anywhere, anytime soon! Before moving to SG, I took the time to test my existing site speed, and support and when I moved, there was a big difference between SG and my previous hosting! You guys are great and if you continue to be the best at what you do, you might have to rent a bigger office/building to make room for more SG team!

Reply
author avatar

Hristo Pandjarov Siteground Team

Nov 30, 2015

Thanks for the great words!

Reply
author avatar

William

Sep 21, 2015

Hi, Any plans for Cloud servers?

Reply
author avatar

Hristo Pandjarov Siteground Team

Sep 23, 2015

Soon!

Reply
author avatar

Alex

Oct 07, 2015

Any update on timeline for Cloud Servers? Still can't even use 5.6 on my cloud server.

Reply
author avatar

Daniel Kanchev Siteground Team

Oct 12, 2015

Alex, there should be no problem to use PHP 7 and 5.6 on your cloud server. Please post a support ticket, so that we can access your server and check the case for you.

Reply
author avatar

Martin

Oct 20, 2015

Hey SG, i think to have PHP 7 with Opcache on a Shared Hosting Platform will be great, From a security point of view: as the Opcache is written in a shared memory. How do you separate "customers opcache memory" in the webservers memory ? Best, Martin

Reply
author avatar

Hristo Pandjarov Siteground Team

Oct 21, 2015

We don't use shared memory at all. The cache is stored in the user's home folder and is accessible only by that user.

Reply
author avatar

james

Mar 29, 2016

What about the plans for bringing php 7 on your dedicated servers ?

Reply
author avatar

Hristo Pandjarov Siteground Team

Mar 29, 2016

It can be installed on your server upon request. Just post a ticket in your Help Desk :)

Reply
author avatar

Jong Faxon

Apr 27, 2016

Very good information lots to think about now.Andrew

Reply
author avatar

Michael Lindholm Nielsen

May 02, 2016

Do you know if there is a list of compatible plugins for WordPress somewhere? Also, it would be great if Memcache could work with PHP 7 at some point :) Best regards, Michael

Reply
author avatar

Hristo Pandjarov Siteground Team

May 03, 2016

If you're using PHP7 you can simply enable the Memcached service from the SuperCaching plugin and the page in cPanel. It will work with memcached instead of memcache but you shouldn't feel any difference. As to the plugins, it's really up to their developers to make them compatible with PHP7 and that's probably a feature that should be added in the official WordPress repo because it would be impossibe for us as a host to gather and organise that information.

Reply
author avatar

Shayan

Jan 04, 2017

This is wonderful. Joomla! + PHP 7.1 = BOOM ! A huge performance improvement.

Reply
author avatar

James

Apr 11, 2017

Yo peeps, I ran PHP 7 and moved back to PHP 5 ( although PHP 7 is fine, OPCache is fine too but I had too go back for a specific reason ) But the OPCache was still interferring with the website so I had to flush it SFTP mannually root PHP7 subfloder PHP7 - then - PHP5

Reply
author avatar

Hristo Pandjarov Siteground Team

Apr 12, 2017

Maybe the dynamic caching was showing fully cached page content, the OPCcache cannot return data if you switch back to 5. Hope that you will manage to sort your code and move to PHP 7 because it's really way better :)

Reply
author avatar

David

Sep 28, 2018

Kills your inode count - and it slows down site administration. For my frequently updated sites, I've disabled this.

Reply
author avatar

Hristo Pandjarov Siteground Team

Oct 01, 2018

PHP7 dramatically improves the speed of your WordPress backend. If you have too many inodes, I would recommend deleting the /.opcache folder from your account. Maybe you've switched between 7.x versions and something went wrong. Furthermore, please update to 7.1 at least if not to 7.2 - there are massive improvements over 7.0. PHP5.6 is already thing of the past and in my opinion in 2018 it should not be used for any production site.

Reply
author avatar

Mhairi

Sep 19, 2022

Hello, how can I see how many extra inodes are being used by opcaching please? I have sooo many extra inodes and I've no idea where they are coming from, so I'd like to delete them. Thank you.

Reply
author avatar

Gergana Zhecheva Siteground Team

Sep 20, 2022

The .opcache folder can be accessed via SSH only. You can check the inode usage for each site from Site Tools > FTP > File Manager. You can find a breakdown of inode usage by folders in the last-but-one columns. In addition, we recommend deleting any unnecessary files, old backup archives, inactive plugins and so on.

Reply
author avatar

huzain

Dec 10, 2022

Hi, I deleted the .opcahche folder from my web space on my website server, and shortly after my website isn't displaying it's normal contents. How do I get my website back?

Reply
author avatar

Ivan Naidenov Siteground Team

Dec 13, 2022

Hey Huzain! When you need to clear the cache - always make sure you're deleting the .opcache's contents, not the folder itself. Not to worry though - we have backups just for cases like this one. Here is how you can restore your entire site or just parts of it: https://www.siteground.com/tutorials/getting-started/backup-and-restore-tool/. If you need further assistance - we'd love to assist, please contact us from the Help Center by following the steps here: https://stgrnd.co/contactus/ .

Reply

Start discussion

Related Posts