Docs Home Return to Homepage
Get Started Login

How to Change Your PHP Version and Settings in cPanel

Last updated Changelog

On this page

Your website’s code runs on PHP, and the version matters. Newer versions are faster and get security fixes, and apps like WordPress need at least PHP 7.4. In cPanel you choose the version, and adjust settings like the maximum upload size, in Select PHP Version.

Note: Check your account’s version before installing an app. If it’s on an old version such as 5.6, installers like Softaculous will refuse to install WordPress until you switch.

Change your PHP version

  1. Log in to cPanel. In the Software section, click Select PHP Version.

    The cPanel Software section with Select PHP Version highlighted

  2. Under Account Global Settings, the PHP version box shows the version you’re using now, marked (current). Click it.

    The PHP Selector showing PHP version 5.6 (current)

  3. Choose the version you want. We recommend 8.3: it’s current, fast, and supported by WordPress and most apps.

    The version list open with 8.3 highlighted

  4. Click Apply.

    8.3 selected and the Apply button highlighted

  5. The box now shows 8.3 (current). The change takes effect straight away for every domain on your account.

    The PHP version now showing 8.3 (current)

Tip: Changing PHP version can occasionally break an old site or plugin. After switching, check your site. If something’s wrong, switch back the same way and contact the site’s developer.

Change PHP settings

  1. Click the Options tab. Click a value to change it, and it saves straight away with a “successfully saved” message. For bigger uploads, such as WordPress themes or media, set upload_max_filesize and post_max_size to the same size, for example 64M.

    The Options tab with post_max_size and upload_max_filesize set to 64M and a success message

Setting What it controls Default
upload_max_filesize Largest single file you can upload 2M
post_max_size Largest form submission, including uploads. Set it the same as or bigger than upload_max_filesize 8M
memory_limit How much memory one script can use 128M
max_execution_time Seconds a script can run before it’s stopped 30
max_input_vars How many form fields a page can send (raise it for big WordPress menus) 1000

Click Reset to default under a setting to undo your change.

Note: To run a different PHP version or setting on one domain only, use the Per Domain Settings tab. The Extensions tab lets you switch on extra features your app needs, such as redis for the Redis object cache.

Troubleshooting

Problem What to do
“PHP version is less than the required 7.4.0” when installing an app Switch to 8.3 as above, then try the install again.
My site shows an error after switching Switch back to the previous version, then ask the site’s developer to update it for the newer version.
WordPress says “the uploaded file exceeds the upload_max_filesize” Raise upload_max_filesize and post_max_size on the Options tab.
Changes don’t seem to apply Make sure the domain isn’t overridden under Per Domain Settings.

Snagged on something? Contact support and we’ll get you sorted.

Snagged on something?

Our sysadmins answer tickets around the clock.