How to upgrade to PHP 7.3
(Classified under: Web Hosting)
Posted on 6 September 2019
Updating the version of PHP that your website uses is relatively straight-forward. Here's a step-by-step guide for how to upgrade on our cPanel-enabled hosting servers:
Step 1: Log into the cPanel on the server that hosts your website
If you don't remember the URL to log into the cPanel, you can simply go to the homepage of your own website and simply add /cpanel onto the end of the domain name.
For example: www.cornerstonewebsolutions.com.au/cpanel
If you don't remember your cPanel account username or password, please let us know and we'll be able to send you your username or reset your password for you.
Step 2: Search for the cPanel PHP modules
Once you've logged into your cPanel, type PHP into the search box at the top of the cPanel main menu and you should see a subset of modules being displayed, similar to the screenshot below:
Step 3: Click into the "MultiPHP Manager" module
Right-click and open the MultiPHP Manager in a new tab or a new window so you can easily come back to the cPanel main menu. You should see a screen similar to the one below (without the yellow highlighting):
Step 4: Select your domains and change the PHP version
As indicated with yellow highlighting above, check the checkbox to the left of each domain that you wish to upgrade to PHP 7.3, then select PHP 7.3 (alt-php73) from the dropdown menu and then click the Apply button.
You will notice that the version in brackets for each of the options in the dropdown menu start with either ea- or alt-. Please be sure that you select the version of PHP with the alt- since this corresponds with the alternate version of PHP supplied by CloudLinux, rather than the EasyApache PHP version. This is not the document to explain the difference between the two implementations, but if you're curious about the difference and why you should be using the CloudLinux version, please drop us a line!
Once you have completed this step, you should notice that the PHP version against each domain name that you selected should have been updated to reflect the version you selected from the dropdown menu.
Step 5: From the main cPanel menu, click into the "Select PHP Version" module
Return to the main menu by closing the tab or new window that you opened in Step 3 and then click into the Select PHP Version module. You should see a screen similar to the one below (without the yellow highlighting and not truncated):
Step 6: Record your current PHP Extensions and PHP Options
Before you change the version of PHP that you're using, you need to take note of the selected extensions and options your website is currently running within CloudLinux.
The extensions your website is currently using are shown as ticked boxes in the matrix at the bottom of the page.
To note the current PHP options, please click on the Switch to PHP options button at the top of the page (highlighted yellow in the screenshot above).
Step 7: Select the version of PHP and click "Set as current"
To change the version of PHP within CloudLinux, select the version that you wish to use from the dropdown menu and then click Set as current.
The dropdown menu is a little hard to see - it's highlighted in the screenshot above, or simply click on the number to the left of the Set as current button.
Step 8: Ensure that your PHP Extensions and PHP Options match your old settings
Check both the PHP Extensions pane and also the PHP options pane to update the new settings to reflect those previously recorded for your previous version of PHP.
Note that the PHP Extensions selections will save automatically when you tick/untick the boxes, while the PHP Options will save when you either click out of a textbox or select a dropdown menu option.
Step 9: Check your website!
It is especially important to check your website to ensure that all aspects of your site are running as expected under your new version of PHP.
If you note functionality that isn't working, undo the PHP version changes that you've just made and contact your web developer to arrange a PHP 7.3-compliant update of your website code.
NB: Information presented here is general in nature, does not take into account your particular situation and should not be used in place of professional IT consultation.