Skip to content

PHP on Managed Servers

We support the following versions of PHP on managed servers:

  • PHP 7.2
  • PHP 7.3
  • PHP 7.4

In case of M1 and M2 managed servers, PHP runs as FPM and you can use multiple PHP versions at the same time.

We install only the PHP modules available in the operating system's repositories. PHP configuration is based on the specification provided by client when ordering a new server.

We can customize the following variables:

  • max_execution_time - maximum execution time of PHP script; we do not recommend more than 5 minutes
  • max_file_uploads - maximum numner of concurrently uploaded files
  • max_input_time - maximum time that a script accepts input for; we do not recommend more than 5 minutes
  • max_input_vars - number of variables accepted in GET, POST and COOKIE
  • memory_limit - amount of memory that a script can allocate; 256MB is a safe option
  • post_max_size - maximum size of form data - should be equal or higher than upload_max_filesize
  • upload_max_filesize - maximum size of uploaded file
  • opcache.enable - enabling and disabling opcache
  • open_basedir - restrict access outside set directories
  • error_reporting - log level
  • display_errors - display of errors; we recommend to leave it off in production
  • log_errors - logging errors into file
  • allow_url_fopen - open external content using fopen
  • file_uploads - enable file upload
  • short_open_tag - enable short php tags <?
  • session.save_path - directory for saving sessions
  • session.cache_expire - cache expiration period, if not used by application
  • session.cookie_lifetime - cookie identifier lifetime - when set to 0, it is deleted upon closing the browser window
  • session.gc_maxlifetime - maximum session lifetime, before it is deleted by server

Settings for PHP FPM:

  • pm (static/ondemand/dynamic)
  • static: number of processes equals pm.max_children
  • ondemand: processes are spawned on demand
  • dynamic: number of process is up to pm.max_children
  • pm.start_servers, pm.min_spare_servers and pm.max_spare_servers
  • pm.max_children - number of processes with pm static a maximum number of processes with pm dynamic
  • pm.max_requests - maximum number of requests, before process respawns
  • pm.start_servers - starting number of processes, only used with pm = dynamic
  • pm.min_spare_servers - minimum number of idle processes with pm = dynamic
  • pm.max_spare_servers - maximum number of idle processes with pm = dynamic

For a busier website, we recommend pm static and pm.max_children set to 10. For normal websites pm ondemand and pm.max_children up to 20.

You can change to following options in Plesk control panel:

  • memory_limit
  • max_execution_time
  • max_input_time
  • post_max_size
  • upload_max_filesize
  • opcache.enable
  • include_path
  • session.save_path
  • mail.force_extra_parameters
  • open_basedir
  • error_reporting
  • display_errors
  • log_errors
  • allow_url_fopen
  • file_uploads
  • short_open_tag
  • pm (static/ondemand/dynamic)
  • pm.max_children
  • pm.max_requests

For the rest, you need to contact our technical support.

The following functions are disabled in PHP:
pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,
pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,
pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,
pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals