This article applies to our current hosting platform. If your site is hosted on our next-gen hosting platform, please email support for help in upgrading PHP. (Not sure which platform you're on? Start here.)
To upgrade PHP:
- Log into Virtualmin (if you don't have these handy, check your welcome email or email support).
- On the left sidebar, click Server Configuration and then PHP Versions.
- Click on the dropdown menu next to Default HTML directory and select the most recent version of PHP (the last one on the list).
- Click Save Versions.
- You should see a confirmation message: "The virtual server NAME has been successfully updated. Use the links below to continue managing it."
- Repeat for each site on your server.
- Make sure everything looks right on your site. If something isn’t working right, simply rollback to the old version and email support so we can take a look.
Note: You'll see a second blank directory with a default PHP version. You should not change any of these settings unless you know what you're doing; most sites will not use separate directories.
If I have multiple sites on my server, will I need to upgrade each one?
Yes. The PHP version is set for each site, so you'll need to repeat the process for each one. To do that, select each site one by one from the dropdown menu at the top of the left sidebar.
How do I know which version of PHP my site uses? How do I know if I need to upgrade PHP?
To check the PHP version on your site, follow the steps above. The number showing in the dropdown menu under step 3 is the version currently running on your site.
We recommend using PHP 7.3; your server will have the most recent 7.3.x available. If your current version does not start with 7.3, we recommend updating.
Updated January 22, 2020.