How to change the PHP version, extensions and php.ini settings.

Each website can run its own PHP version. Here is where to switch it, turn extensions on and raise limits like memory_limit — and what to watch for.

2 МИН ЧТЕНИЯ

You can run a current WordPress on a recent PHP and an older app on an older PHP on the same hosting plan. Everything about PHP is on one page of the panel.

Where it is

Open your project → Website → PHP in the menu on the left (or type «php» in Search this website).

At the top, Settings for chooses what you change:

  • the whole hosting — one version for all websites of this hosting, except the ones with settings of their own;
  • one domain — that website gets settings of its own (« has PHP settings of its own»). Use the hosting's puts it back on the common settings.

Switching the version

  1. Under PHP version, pick the version.
  2. Click Switch version.

It takes effect within seconds; nothing needs restarting. Pick the newest version your site supports: the panel marks versions that no longer get security fixes. Older versions opens the rest of the list for old apps.

Extensions

Extensions of PHP lists every extension (curl, gd, imagick, intl, mbstring, redis, sodium…). Turn the one you need on and save. Built in ones are always there. Find an extension filters the list.

If a plugin or app needs an extension that is off, its install fails or it shows «Class not found» errors. Turn the extension on here and try again.

memory_limit and other settings

Settings of PHP holds the php.ini options, each with its Default:

  • memory_limit — raise it for image-heavy WordPress sites
  • max_execution_time — raise it for heavy admin tasks and imports
  • upload_max_filesize — raise it for large media uploads
  • post_max_size — must be at least upload_max_filesize

Click Save settings; they apply at once.

Checking what runs

PHP information in the top right shows phpinfo() of the website — no need to upload a phpinfo.php file.

Watch out for

Old plugins breaking. Newer PHP is stricter about deprecated code. Check the plugin authors' compatibility notes first, or try the new version on a staging copy of the site.

Composer-managed apps. Laravel and Symfony apps declare the PHP versions they support in composer.json. After switching, run Composer in the Terminal (Website → Terminal):

composer update --dry-run   # see what would change first
composer install

Rolling back

If a new version breaks the site, pick the previous one under PHP version and Switch version again. It is back within seconds.

Всё ещё не можете разобраться?

Напишите живому инженеру — медианный ответ менее 3 минут в любое время суток.

Написать в поддержку