What you get
- The right PHP version for each site in your account.
- Higher PHP limits when an application needs them: larger file uploads, more memory for WordPress, more time for imports.
PHP 8.2, 8.3 and 8.4 are available on all web hosting and WordPress plans; the default is 8.3.
Before you start
- You can choose between PHP 8.2, PHP 8.3 and PHP 8.4. A new site starts on PHP 8.3. PHP 7 is not available: a site that requires PHP 7 must be updated.
- The version is set per site: the domains and subdomains added to the same site use the same version.
- Check which version your application, theme and plugins require.
- Before the change, back up the site from its “Backups” tab: “Create backup” (in “English (US)” the button is called “Backup now”), then “Backup now” in the window that opens.
- The names in this guide are the ones from the English Enhance interface. If Enhance opens in another language, you can switch it to English from the top right: your photo or initials » “My account” » “Language”.
- The values each site starts with, for reference:
| Setting | Default value |
|---|---|
memory_limit | 256M |
upload_max_filesize | 1000M |
post_max_size | 1000M |
max_execution_time | 30 (seconds) |
max_input_vars | 1000 |
allow_url_fopen | On |
display_errors | Off |
Steps — change the PHP version
- Log in to Enhance at https://server.nbt-host.com. In the left-hand menu, click “Websites”, then your website.
- Open the “Developer tools” tab. If you don't see it in the row of tabs, it's in the “Advanced” menu, at the end of the row.
- Under “PHP”, below “Change the PHP version for your website”, choose 8.4, 8.3 or 8.2 from the list.
- In the “Update PHP version” window, click “Update”.
- Open the site and check the important pages.
Steps — change the PHP settings
- On the same page, “Developer tools”, go to “php.ini editor”. At first it says “No php.ini directives”: the site uses the default values from the table above.
- Click “Add directive”.
- Under “Directive”, enter the name of the setting, for example
memory_limit. Under “Value”, leave the type as “Text” and enter the value, for example512M. For on/off settings, choose the “Boolean” type and “Enable” or “Disable”. - Click “Create”. The setting appears in the list.
- The most frequently requested:
memory_limit: the memory available to a script. WordPress with many plugins, a page builder or WooCommerce may need, for example,512M.upload_max_filesizeandpost_max_size: the largest file you can upload through the site.post_max_sizemust be at least as large asupload_max_filesize.max_execution_time: how many seconds a script can run, for example during large imports.max_input_vars: if a large menu or the theme settings do not save completely, raise it to5000.allow_url_fopen: it is on; turn it off only if you know your application does not need it.display_errors: leave it off on a public site. Turn it on only while you are looking for an error.allow_url_include: do not turn it on, it is a security risk.
- To change a setting you have added, click it in the list, change the value and click “Save”. “Delete” removes it, and the site goes back to the default value.
- Check. In WordPress, the PHP version and limits are shown in the dashboard, under Tools » Site Health » Info » Server. If the new value does not appear, click “Restart” next to the “PHP” heading and confirm in the “Restart PHP container” window. The site is down for a few seconds while PHP restarts.
Do not copy here all the settings from a php.ini file brought over from another host. Add only what you need.
If something doesn't work
- After changing the version, the site shows a 500 error or a blank page. Switch back to the previous version, with the same steps. You can usually find the cause in the error log: on the “PHP” card in “Developer tools”, under
php-error.log. Update the theme and plugins and try again. - The new setting does not take effect. Check that you spelled the setting’s name correctly. Restart PHP with “Restart” next to the “PHP” heading, and clear the cache if you use a caching plugin.
- “The uploaded file exceeds the upload_max_filesize directive” (or the equivalent message in WordPress). Raise
upload_max_filesizeandpost_max_sizeto the same value. - “Allowed memory size of … bytes exhausted”. Raise
memory_limit. In WordPress, also check whether a lower value is set forWP_MEMORY_LIMITinwp-config.php. - You are looking for “MultiPHP Manager” or “Select PHP Version”, as at your previous host. They do not exist in Enhance: you change the version from “Developer tools”, under “PHP”, and the settings from “php.ini editor”, on the same page.
