Changing PHP Version for Joomla!
For Web Hosting packages
In this article, we will show you how to change the PHP version running your Joomla! website and what to consider when switching to a newer PHP version.
What is PHP?
PHP is a programming language that runs on the web server. It is mainly used to create dynamic web pages or web applications. For example, all Joomla! websites run on PHP.
When does it make sense to change my version of PHP?
Like Joomla!, PHP is constantly being developed and improved. For Joomla! website administrators, one of the following situations can occur which requires changing to a different PHP version:
- A Joomla! update requires a newer version of PHP.
- A certain version of PHP is outdated and should not be used anymore.
- A new version of PHP is available, and you want to take advantage of the performance enhancements.
Which PHP version should I use?
You can choose between a few different PHP versions. If there is no particular reason to use a certain version, you should use the recommended version. Currently this is PHP 8.1. With this version, you can use the most popular and tested applications without having to worry about compatibility problems.
Preparing and Changing the PHP Version
Technically, you only need a few mouse clicks to migrate your domain - and thus your website - to a new PHP version. However, it is possible that the Joomla! version you use, individual plugins, or your website's theme are not yet fully compatible with the new PHP version. In order to avoid any problems that may pop up, it is highly recommended that you prepare the website for the changes ahead of time, and then you can change the PHP version. We suggest that you follow these steps when switching to a new PHP version:
Create a Backup
Before you change the PHP version, you should make a backup of your Joomla! website. If you don't have your own backup method yet, try using the free Akeeba Backup Plugin. Akeeba Backup is an easy-to-use open source backup solution that allows you to create a full backup of your website.
The older your Joomla! version is, the more likely it is that the PHP code used is no longer compatible with the new PHP version. Please check if updates for your Joomla! version, plugins and the theme are available. Unless you need to use an older version for some reason, you should always keep your Joomla! installation and all components up to date. Additionally, these updates also regularly close security vulnerabilities.
Check Theme and Plugin CompatibilityIf you are using third-party plugins, you can check in advance if it is compatible with the future PHP version. Open the page https://extensions.joomla.org/ and search for the corresponding plugins. On each page, click the Support button and check the page information about the PHP version. This may also be hidden under the Requirements link,
Change the PHP VersionAfter you have made all of the preparations, you can change your domain to the desired PHP version. Activating the new PHP version only takes a few minutes. Click here to find out how to change the PHP version for your domain
Check the Website for Errors
As soon as the new PHP version is active, you should immediately check the website thoroughly:
- Is the website accessible?
- Are all subpages accessible?
- Do all sliders, galleries, forms, etc. still work?
- Does the backend (administration area) work?
If there are problems with the new PHP version, it is recommended that you check all plugins again for compatibility. You may need to uninstall or replace incompatible plug-ins with other plug-ins that work.
In order to restore the availability of the website or the backend as quickly as possible in the event of a problem, you can switch the domain back to the previous PHP version. Please note that it may take a few minutes after the change for this PHP version to become active again. If errors occur with the old version as well, you will have to restore your website from the backup.