Select PHP Version in cPanel

cpanel_select_php.png

Select PHP version

Most of the time when you get web hosting and install WordPress on it, everything works by default out of the box. But sometimes, you might try doing things a little differently – perhaps install software that isn’t standardized, for example. Or you may need to increase certain in-built PHP limits like the memory allocation, or the maximum allowing file size for media uploads.

These can all be modified in the PHP options section of cPanel. From here, you can do the following:

  1. Change the PHP version
  2. Enable or disable PHP modules
  3. Modify the PHP configuration parameters

All of these can also be done via the command line if you’re on a VPS server. But it’s much cleaner to do it via the GUI, where you can simply enable or disable checkboxes as necessary and choose the right values from a dropdown box. In this tutorial, I’ll show you how to configure PHP options from cPanel for Encrypted Hosting.

Enabling and Disabling PHP Modules

Log into your cPanel account for the domain whose PHP version you want to change. Uou can have multiple domains on a shared hosting service, and you can have different versions of PHP for individual folders corresponding to different websites.

So make sure you log into the right cPanel on Encrypted Hosting. Other hosts may allow you to modify the PHP version for individual folders, but that’s not how it’s done on Encrypted Hosting. Once inside, search for “PHP Version”, and choose the appropriate icon as shown below:

Select PHP Version in cPanel

This will bring you to a screen with the following components:

  1. A dropdown box to select the PHP version
  2. A list of modules you can enable/disable

For each PHP version in the dropdown box, you can configure the PHP modules you want to have. By default, the most important packages for your current version are already enabled.

Here’s a screenshot of some of the modules you can enable/disable.

Choose PHP Extensions to Enable or Disable

From here, you can also modify the current PHP version of your website. Also keep in mind that if you select the “native” option, you won’t be able to enable or disable any extensions. This is the version that comes in-built when Apache is installed, and so doesn’t allow for any changes. It shouldn’t matter because you can select the version you want as a separate item in the drop-down box even if there’s a “native” version present.

Switching PHP Configuration Parameters

From this same screen, you can then click the top right box that says “Switch to PHP Options”.

Switch to PHP Options

This brings up a list of PHP parameters – that normally reside in the PHP.ini file, that we (luckily) don’t have to modify ourselves. There’s a long list of useful options here.

For example, if you want to change the size limit of the files that you’re allowed to upload to WordPress via the media uploader, you can change that here as shown in this screenshot:

Change PHP Options like Maximum Upload File Size

You can also do stuff like modify the amount of memory that PHP is allowed to use for this domain. This is a tricky option to handle, and normally you shouldn’t need to modify it unless you have good reasons for doing so.

You don’t need to save your changes once you enable or disable options in these screens. The changes are made automatically as soon as you modify something then and there. There will be a little visual indicator and a green pop up on the top right of the window that tells you whether the operation was successful, so there’s plenty of feedback.

But be careful with this screen! Make changes here only if you know what you’re doing. Luckily, reversing them is as easy and making the modification in the first place.

Leave a Reply

Your email address will not be published. Required fields are marked *

scroll to top