With the arrival of Joomla 3.5 we were offered a very nice treat: PHP 7 support. Adopting the latest PHP version is something that you should consider as soon as possible, as this new version brings considerable performance improvements that ultimately reduce load time and memory usage. If you want to see a comparison of the same website running PHP 5.6.10 and 7.0.0, click here. Results are eye-popping.

Because of the huge revamp PHP has gone through, the latest version is not backward compatible, and some of the extensions that you're currently using might not work with PHP 7 and your site could break when you make the switch. A good approach is to make sure you are using the latest versions of your extensions, and to try the changes on your test site first.

Let's get down to business, shall we? If you are hosting your Joomla-powered website with Webfaction, the first thing that you should check is the PHP version your site is running. Do this from inside Joomla, not from the Webfaction Control Panel, as the information in the latter doesn't update when you make any changes. From the upper menu in the backend go to System->System Information. This will display the most relevant information for your system:

 

 hefesto old joomla config

What we are going to do is to create a .htaccess file (if you don't have one already) and to add the following lines to it:

<FilesMatch \.php$>
    SetHandler php70-cgi
</FilesMatch>

And that's it. Upload the file to your Joomla root directory (the path is something like $HOME/webapps/application/ where application is the name you gave to your Joomla site in the control panel).

hefesto new joomla config

Your site is now running on PHP 7. If something breaks and you need to revert the change, you probably want to go back to PHP 5.6, if that is the case, modify the handler in your .htaccess file:

<FilesMatch \.php$>
    SetHandler php56-cgi
</FilesMatch>


Don't  want to lift a finger? Grab the file, unzip, and upload to your Joomla root directory.


Comments (0)

There are no comments posted here yet

Leave your comments

Posting comment as a guest. Sign up or login to your account.
Attachments (0 / 3)
Share Your Location