Updated on Feb 14, 2022
Having the option to choose from multiple PHP versions is an absolute must. That’s why FastComet supports multiple PHP versions on every shared hosting package.
FastComet uses AlmaLinux as the OS on our servers to improve server stability. A major feature of AlmaLinux is that each cPanel account can select the global PHP version they want to have for their websites. You have the option to change your PHP version and enable/disable different PHP modules via the web-based interface in your cPanel.
Our SysAdmins install the most recent versions of PHP on our shared hosting servers after extensive testing and troubleshooting. Keep in mind that the default version of PHP for a newly created website is usually one or two versions behind the latest update. That’s for the sake of stability. However, feel free to update to the latest version as soon as it is available.
At some point, a version of PHP will become obsolete which is referred to as the “end of life” of that version. This means that the version of PHP will no longer receive any security fixes. Unfortunately, there are many websites that still run on outdated PHP versions. All these websites are at risk.
There are several very solid reasons why you should use one of the most recent PHP versions:
The primary reason that you should update your PHP is for security. Older PHP versions are no longer getting security fixes. That means known vulnerabilities are not being fixed on that version which leaves your site open to attacks.
Newer PHP versions always execute code faster which means faster page load speeds. Furthermore, faster page load speed leads to a better user experience and good SEO signals. You should know that site speed is an SEO ranking factor. So if you are aiming for page one of Google search results, site speed is quite important.
When running the latest PHP versions, you are protected from the latest known vulnerabilities. Developers work to fix security vulnerabilities in PHP when they come to light. The same goes for known bugs.
Now you’re curious how to update your PHP version. First off, you have to find out what version of PHP you are using. There are several ways to check your PHP version.
When using WordPress, you can access the Site Health page from your WordPress Dashboard and see lots of useful information that you can address to keep your site secure. You can reach it by going to Tools and then clicking on “Site Health”. Another way is to just append your domain with:
/wp-admin/site-health.php
With Site Health, you can see the exact PHP version your website is using at the moment.
You can easily check your PHP information using the Select PHP Version cPanel tool:
You will then be forwarded to a page with detailed information about your current PHP version, modules, values, etc. Scroll down to browse for more.
If you wish to find data about a specific module or function, you can use the CTRL + F (CMD + F for macOS) shortcut to open the search feature within your browser.
phpinfo
FileIn case your hosting platform doesn’t offer the mentioned built-in PHP Info feature, there is no need to worry! You can reach the same goal by creating a phpinfo
file in your public_html
directory.
The file will be accessible via a browser and will show you the same detailed information.
You will need a way to access your public_html
files. Here we’re using the cPanel File Manager as an example.
public_html
directory, click the New File button:<?php phpinfo(); ?>
The same result can be achieved by using any text editor on your computer. Create the phpinfo.php file by following the same steps from before, then uploading the file to your server’s public_html
folder through an FTP client.
If you don’t know how to configure or never worked with an FTP client, such as FileZilla, refer to our FTP guide for more information.
You should have a phpinfo.php
file in your public_html
directory by now. So, all that’s left is to access the file by adding /phpinfo.php
at the end of your domain name.
You should see a similar view when the file is accessed via any browser:
Note: If you don’t want your phpinfo page to be displayed all the time, you can easily disable the file by giving it a different name. phpinfo.php_disabled, for instance.
To change your PHP version:
Additionally, you can easily enable the log_errors and change upload_max_filesize
.
The answer to that question is yes. However, it’s a bit more complicated than changing the PHP version for your entire account. Luckily, we have a guide that explains everything in detail and you should have no trouble setting different PHP versions per directory.
In addition to changing the PHP version from cPanel, you can also change some specific PHP settings. You have the option to enable/disable PHP extensions and configuration directives such as allow_url_fopen
, error_log
, etc.
If you use this feature, you don’t need to configure and maintain custom php.ini files—you control all PHP settings directly from cPanel.
To change your PHP settings, do the following:
Note:
In case you do not see Select PHP Version in the Software section, contact our technical support via a support ticket.
Selections are saved automatically.
Changes are saved automatically and take effect immediately.
Note: After you modify a setting, a Reset to default link will appear beneath the setting label. Click the link if you want to change the setting back to its default value.
Switching to one of the latest PHP versions may not seem like something that important to a lot of users, but it’s actually crucial for the security and speed of your website(s). Use this tutorial and you will have no problem changing your PHP version. Feel free to bookmark it in your browser and come back to it when you need to switch to a newer version of PHP, about which we keep everyone posted in our blog.