Development and databases

PHP, select version, modules and basic configuration

Reviewed on 4 min read PHP modules

All our services give you flexibility in choosing which PHP version to use, and you can do it from the client area or from cPanel.

From the client area

Go to Hosting, open your service and go to PHP. Click Change on a website's row: its page has four tabs.

  • Version: change the version for that website or the default version, with a compatibility study, a check afterwards and 24 hours to roll back. This is explained in Change a website's PHP version.
  • Extensions: enable or disable the modules of the version the website uses.
  • Limits: adjust memory_limit, upload_max_filesize, post_max_size, max_execution_time and max_input_vars.
  • Errors: read that website's errors.

Extensions and limits belong to the PHP version across the whole account, not to the website. If you enable a module in PHP 8.3, it stays enabled for everything running on 8.3. Before you change anything, the page tells you which other websites share that version.

When you enable a module that cannot coexist with another, such as mysqli and nd_mysqli, we first disable the incompatible one and let you know. After each change we check that it has been applied; if the server does not accept it, we tell you and leave everything as it was.

From cPanel

Change the PHP version

Log in to cPanel and go to the Select PHP Version section. Next to Current PHP version, open the version number drop-down, choose the one you want and click Apply (in older versions of cPanel, Set as current).

Current PHP version drop-down in cPanel with the Apply link

This change affects the hosting's default version, the one used by websites that neither have their own version nor inherit one from a parent folder. If different websites need different versions, see PHP per directory or domain.

Select the modules

The same section has the list of modules (extensions). Tick the ones you need and untick the ones you do not; they are saved immediately.

List of PHP modules in cPanel

Reset to default enables the recommended selection, with the modules that WordPress, Joomla, Drupal, PrestaShop and similar usually need. Use it if some module is missing after you change version. Bear in mind that it disables any modules you had added by hand outside that selection: note them down first.

Modules are saved per version: if you switch from PHP 8.2 to 8.3, check that the modules your website needs are enabled in 8.3.

Change the configuration values

Click the Options tab, next to Extensions.

Options tab in the cPanel PHP selector

You will see the most common values: memory_limit, upload_max_filesize, post_max_size, max_execution_time, max_input_vars... Click the value, change it and it will be saved automatically.

Editable PHP configuration values in Options

Leave display_errors turned off on a public website: it would show paths and errors to visitors. To see the errors, use the Errors tab on the website's page in the client area.

If an option does not appear here, you can customise it from the .htaccess file.

After changing the version or modules from cPanel, test the website's home page, admin area and forms. Unlike the client area, cPanel does not check compatibility or let you roll back automatically.

You may also find useful

Something wrong or out of date? Tell us and we will review it.