Choose your PHP version and settings
Each website runs its own PHP version and settings, so you can change one site without affecting the others. Newer versions are faster and get security fixes; old versions stop receiving them.
All PHP settings are in the website’s Developer tools: open Websites, select the website, then select Advanced in its navigation bar and choose Developer tools.
Before you change the version
Section titled “Before you change the version”- Check which PHP versions your application supports. WordPress, its plugins and its theme each have their own requirements.
- Take a backup first, or clone the website and test the new version on the copy.
Change the PHP version
Section titled “Change the PHP version”-
Under Change the PHP version for your website, open the version list marker 1.
-
Choose the version. LATEST marker 3 marks the newest version and LTS marks versions with long-term support.
-
Read the confirmation and select Update.
Load a few pages of your site, including any forms and the admin area, to make sure everything still works. If something breaks, switch back to the previous version the same way.
Restart marker 2 restarts PHP for the website. Use it if the site seems stuck after a change.
PHP extensions
Section titled “PHP extensions”Built-in extensions marker 5 are always on. Below them, Configurable extensions lists extras you can turn on for this website, such as apcu and pgsql. Only turn on what your application asks for.
The PHP section also shows the website’s php-error.log, the latest PHP errors since PHP last restarted. It is the first place to look when a page shows a blank screen or an error.
Change php.ini settings
Section titled “Change php.ini settings”Settings such as the upload limit, memory limit and maximum run time are set for you to suit most sites. If your application needs a different value, change it in the php.ini editor marker 4.
The list shows the settings in use. Inherited means the website uses the standard value.
- To change a listed setting, select its menu button marker 4, then Edit, and enter the new value.
- To add a setting that is not listed, select Add directive marker 1, enter its name in Directive marker 2, such as
memory_limit, choose the kind of value marker 3, enter the value and select Create.
Common settings:
| Directive | What it controls |
|---|---|
upload_max_filesize |
The largest single file that can be uploaded |
post_max_size |
The largest form submission, including uploads; keep it larger than upload_max_filesize |
memory_limit |
How much memory one PHP request can use |
max_execution_time |
How many seconds a PHP request can run |
max_input_vars |
How many form fields one request can send, which matters for large menus and settings pages |