Adjust PHP settings per domain

Skip to main content
Du bist hier:
Drucken

Adjust PHP settings per domain

In the hosting management (Plesk) you adjust selected PHP settings for each domain yourself, for example the error display for debugging, the memory per script or the maximum upload size. The change applies only to the selected domain and takes effect within a minute. The feature is available on the Linux web hosting servers.

Which settings you can adjust

  • display_errors: shows PHP error messages directly on the website. Enable for debugging only.
  • log_errors: writes PHP errors to the error log of the domain (in Plesk under “Logs”).
  • error_reporting: which error levels are reported.
  • memory_limit: maximum memory per PHP script, for example 256M.
  • post_max_size: maximum size of a form or POST request, for example 64M.
  • upload_max_filesize: maximum size of an uploaded file, for example 64M.
  • max_execution_time: maximum runtime of a script in seconds.
  • max_input_time: maximum time in seconds for reading input data, for example uploads.
  • max_input_vars: maximum number of input fields per request, important for large forms and menus.
  • date.timezone: default time zone for PHP, for example Europe/Zurich.

Security-related values such as disable_functions, open_basedir, session.save_path and allow_url_include are fixed and cannot be changed. Size and time values have an upper limit per hosting plan. It is shown directly below the respective field.

How to adjust the settings

  1. Open the hosting management (Plesk). You find the access in the customer portal under My services at the respective hosting.
  2. Under Websites & Domains, open the domain and click PHP Settings in the developer tools group next to “PHP”. Alternatively you find the entry on the “Websites & Domains” page in the right sidebar.
  3. If you come from the sidebar, click Adjust next to the domain you want.
  4. Set the values you need. An empty field or the selection Default means: the value of your hosting plan applies.
  5. Click Save. The change is applied in the background, the page shows the status and reloads afterwards.

Sidebar in the hosting management with the entry PHP Settings

Domain list of the PHP settings

PHP settings form of a domain

Restore defaults

With Restore defaults you reset all settings available here to the values of your plan. The button appears as soon as at least one value differs from the default.

Change log

Below the form you see who changed which setting and when, and whether the change was applied successfully.

Tips

  • Enable display_errors for debugging only and set it back to default afterwards. Error messages on the website reveal details about your installation to visitors.
  • post_max_size must be at least as large as upload_max_filesize, otherwise large uploads fail.
  • Subdomains and additional domains have their own PHP settings. Adjust them separately if needed.
  • For WordPress, Joomla or shops, clear the cache after a change and test the site.

Frequently asked questions

Applying the settings failed. What now?
Try again after a minute. If the error persists, contact support with the domain name and the time.

I need a higher value than the upper limit allows.
Contact support. We check whether the value is possible in your plan or whether a larger plan fits.

Where do I see all current PHP values of my domain?
With an info.php file, as described in the article Show PHP settings.

Can I also change the PHP version here?
No, you change the PHP version in Plesk directly at the domain, see Change PHP version in Plesk.

I have Windows hosting.
There, support adjusts the PHP values for you. Tell us which setting you need for which domain.

Related Post