Learn to switch PHP Versions and Settings using Plesk
Introduction
Your website relies on a specific version of PHP. You need to switch the active PHP version to meet compatibility or performance requirements. Plesk has two modes of managing PHP, based on whether the server uses CageFS isolation technology. This article guides you on how to change both the active PHP version and its settings in the Plesk account using both methods.
Getting to Know PHP Version Management
PHP is the most common scripting language for websites. The new features and security updates come in with different new versions. The changing of the PHP version should be done cautiously to prevent problems on the site. This is easily done in Plesk by allowing you direct control over the PHP handler that your domain uses. These steps vary based on your host’s server setup, specifically the presence of CageFS.
Switching PHP Version and Settings with CageFS
CageFS is a virtual file system that isolates every user. When CageFS is active, you use a specific PHP Selector tool inside Plesk to manage your PHP version and modules.
Steps to Switch PHP Version
Access the PHP Selector to change the active version for your domain.
- Log in to Plesk for administrative access.
- Go to Websites and Domains in the left sidebar to view all your domains.
- Find the options panel. Open the ‘PHP Selector’ icon here.
- When asked, select your domain in the Webspace list (as a dialog box might appear if you have multiple domains) and press the OK button.
- On the next page, find the PHP version list box. Select the new version you want and press ‘Set as current’.
Steps to Switch PHP Modules and Settings
The PHP Selector tool also lets you manage PHP modules and adjust core settings like memory limits. Follow the steps below:
- Repeat steps 1 to 4 from the section above and go back to the PHP Selector page.
- In order to add or remove PHP modules here, select or deselect the boxes beside the module names to manage them.
- To implement module changes, click on the ‘Save’ at the bottom of the page. This action applies all the selected module changes.
- The button at the top, which is labeled as ‘PHP Settings’, opens the detailed PHP settings page.
- Click on the setting value located in the right-hand column for any setting you wish to modify. Enter or select your desired setting. Then, click the Apply button.
- To save all changes, click on ‘Save’ at the bottom of the page.
Changing PHP Version and Settings Without CageFS
When your server is not using CageFS, you can change the PHP settings directly using the Hosting Settings. This uses the standard Plesk interface.
Steps to Switch PHP Versions
Change the handler in the domain’s general configuration to switch the PHP version.
- Log in to Plesk.
- Go to the Websites & Domains link in the left sidebar menu.
- Click on the Hosting Settings option for your domain. This opens the domain configuration page.
- Scroll down to the Web Scripting and Statistics section. In the PHP support (PHP version) list box, select the specific PHP version you want to start using.
- Click OK to apply; the new version will become effective immediately for your domain.
Steps to Change PHP Settings
You can adjust common PHP parameters right within the Hosting Settings page without CageFS.
- Follow the above steps 1-3 to get to the Hosting Settings page.
- Scroll down and click on the Common Settings section to expand the PHP configuration options.
- Change any setting here. Click on the settings value in the right column, and then type in or select a new setting value.
- Click on the Apply button at the bottom of the page to make all your changes to the PHP settings active.
Versatile Hosting Environment of Cantech.
Cantech gives full flexibility for your websites. Our hosting plans support a smooth version change of PHP in Plesk, allowing you the freedom to control the needs of your application with the assurance of being able to optimize the performance of your site.
Conclusion
Plesk provides easy ways to change PHP versions and modify settings, irrespective of the server’s CageFS status. The above steps would ensure that your website operates in the most effective PHP environment.
FAQs
Why should I change the PHP version of my site?
Changing the PHP version is important for security and performance reasons. Newer PHP versions are faster and contain fixes for older security vulnerabilities.
What happens if I switch to a very old or new PHP version?
An incompatible PHP version can result in errors or even failure to load the site. Never install an application without checking its requirements.
What does the “PHP Selector” tool do?
The PHP Selector tool allows users with CageFS accounts to select their PHP version and to enable or disable certain modules.
Is the change effective immediately after clicking OK or Apply?
Yes, when you click on the OK or apply button, the new settings are normally activated immediately and without delay.
Where can I see which PHP version my site is currently using?
The version of PHP that is currently in use is usually displayed next to the domain name on the main Websites & Domains in Plesk.