Choosing the Right PHP Version
PHP powers most of the popular applications on shared hosting, including WordPress, Joomla, and Drupal. The version of PHP you run has a direct effect on how fast and how secure your site is. This guide explains why newer PHP matters and how to switch versions safely on your account.
Why Newer PHP Is Faster and More Secure
Each major PHP release brings real performance gains. Modern versions execute the same code in less time and use less memory, so pages render faster and your account handles more traffic within the same resource limits. The improvements are large enough that simply moving to a newer PHP version is often one of the easiest speed wins available.
Security matters just as much. Older PHP versions eventually reach end of life and stop receiving security patches. Running an unsupported version leaves known vulnerabilities open. Staying on a supported release keeps you protected and keeps modern themes, plugins, and frameworks working, since many now require a recent version of PHP.
Check Compatibility First
Before switching, confirm that your application and its extensions support the version you are moving to. A mismatch can cause errors or a blank page. Check these first:
- Core application — Make sure your CMS or framework officially supports the target PHP version.
- Themes — Confirm your active theme lists the version as supported.
- Plugins and extensions — Update everything to the latest release, since older add-ons are the most common source of incompatibility.
For WordPress specifically, the Site Health tool (Tools & Site Health) reports your current PHP version and flags known compatibility issues. Update WordPress core, your theme, and all plugins before switching.
Changing the PHP Version per Domain
You choose your PHP version with the CloudLinux PHP Selector, which lets you set a different version for each domain on your account. In brief:
- Log into cPanel.
- Open Select PHP Version (the PHP Selector) in the Software section.
- Choose your target PHP 8.x version from the dropdown and apply it.
For the full walkthrough, including how to enable extensions and set a per-directory version, see PHP Selector.
Tuning PHP Settings
The PHP Selector also exposes common runtime settings, so you can adjust them without editing configuration files. The values you are most likely to change are:
- memory_limit — The maximum memory a single script may use. Raise it if you see out-of-memory errors during imports or with heavy plugins.
- max_execution_time — How long a script may run before the server stops it. Increase it for long tasks such as backups or large imports.
- upload_max_filesize — The largest file that can be uploaded through PHP. Raise it if you need to upload large images, media, or plugin archives. Also check
post_max_size, which must be at least as large.
Set these to sensible values for your workload rather than to the maximum — oversized limits let a single runaway script consume your account's resources.
Rolling Out the Change Safely
If your site is business-critical, reduce risk by testing the new version before you commit to it site-wide. A staging copy of your site lets you switch PHP versions and verify everything works without affecting live visitors. Once the staging copy runs cleanly on the new version, apply the same version to your production domain.
If you switch and run into an error you cannot resolve, revert to the previous version and open a support ticket — our team can help you pinpoint the incompatible component.