- What is PHP?
- What is the lifecycle of PHP?
- Will my website be affected when PHP is updated?
- What are the benefits of updating?
- How does One.com handle an "End of life" of a PHP version?
- How can I prepare my site for a PHP update?
- Where can I change my PHP version?
In this guide, we explain why it is necessary to update PHP, what the benefits are and how you can prepare your site for the update.
What is PHP?
PHP is an open source programming language that runs on a web server. It is one of the most popular languages for web development, for example, all WordPress sites run on PHP.
PHP is a server-side script, meaning that it is executed on the web server, contrary to HTML, which is executed in the browser. By combining PHP with HTML you can create dynamic websites, for example, sites created with WordPress, Joomla and Drupal.
What is the lifecycle of PHP?
All PHP versions have a lifecycle of about 3 years, after which they are no longer supported.
After the initial release, a PHP version is actively supported for approximately two years. After that time there will be 1-2 years of security support, meaning that there are only releases for critical security issues. During this phase, the next PHP version is already available.
When a PHP lifecycle has ended it doesn't get updated anymore, so after that time it's no longer secure to use it. You can check the PHP website to see which versions are currently supported.
Will my website be affected when PHP is updated?
That depends, if your website is using PHP, it may be affected. If your website is created with HTML, like Website Builder, then the PHP update has no effect at all.
If the code in your website is compatible with the new PHP version, your site will keep working as before. If you use the latest version of a CMS, like WordPress, Drupal or Joomla, then your site will probably be fine. However, don't forget that you also need to make sure that your plugins and themes are updated and supported.
If you use code that is outdated and not supported in the newer version of PHP, then your site will give errors and may stop working altogether. This may be a problem if you have a website with custom code, for which an update is not readily available.
Note: If you suspect that your site contains outdated code, it's very important that you take the time to update your site, before older PHP versions are removed from our servers. It's easier to fix things, if your site is still working, and you are able to switch between older PHP versions.
What are the benefits of updating?
- Better security - The most obvious reason to update is security. Newer versions are better at countering hackers, for example, because deprecated (outdated) code is no longer supported.
- Faster websites - Newer PHP versions are faster, especially the difference between PHP 5.6 and 7 is significant; WordPress sites run on average two times faster on PHP 7 than on 5.6.
- New features and improvements - As with all updates, a newer version includes new features and improvements on how to do things, for example, error handling.
How does One.com handle an "End of life" of a PHP version?
- First, we inform all customers who still use this version, that support is about to end and advise them to update as soon as possible.
- Next, we update PHP automatically for all customers. If your site stops working, this means you need to update your website to make it compatible. At this time it is still possible to go back to the old version, allowing you to access your site and fix things.
- Finally, we update PHP again and then also remove the unsupported version from our servers. From then on it's not possible to go back and the version is no longer available as an option in the control panel.
Note: If your website isn't working after the first time PHP gets updated, this means that action is required. Even though initially you can still go back to the previous PHP version, this is not a solution.
Unless you make your website compatible with the newest PHP version, it will stop working again with the second update and at that time it is no longer possible to go back.
What can I do to prepare my website?
Since a PHP update is unavoidable, it's a good idea to be a pro-active and make sure your site is ready.
- Make sure that you have updated your website to the latest version.
- Remove plugins, themes or old installations that you don't use.
- Change the PHP version from the control panel, at a time of your convenience, and check if everything is working.
- Fix any errors that occurred, either do it yourself or find a developer who can help you.
Do you have a WordPress site? Then check our dedicated guide: How do I update PHP for my WordPress site?
Where can I change my PHP version?
You can easily change your PHP version from the One.com control panel.
- Log into the One.com control panel.
- Click PHP & Database - MariaDB.
- Scroll down to Update PHP version.
- Select the version you want to use and click Update.
Note: It takes 20 minutes before the update is in effect. If you have a website with a lot of visitors, it may take a couple of hours.