๐ŸŸข Network Status| First month from $2.00 โ€” fully managed | Contact Support
Skip to content
Need help? Real engineers available 24/7. Average response under 15 minutes. Open a support ticket โ†’

PHP & Python Settings in Plesk โ€‹

Switch PHP version per domain โ€‹

  1. Open the subscription โ†’ PHP Settings (or Websites & Domains โ†’ PHP Settings).
  2. Select the PHP version from the dropdown โ€” available versions depend on what's installed on the server.
  3. Click OK. The change applies immediately.

Customize php.ini values โ€‹

From the same PHP Settings page:

  1. Scroll to the Additional configuration directives section
  2. Enter custom php.ini values, one per line:
ini
memory_limit = 512M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_vars = 3000
display_errors = Off
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
  1. Click OK โ€” changes apply immediately without restart

Common settings for WordPress/WooCommerce โ€‹

SettingRecommendedWhy
memory_limit512MWooCommerce with many products needs headroom
upload_max_filesize64MLarge media uploads
max_execution_time300Long-running imports/exports
max_input_vars5000Complex product attributes in WooCommerce

PHP performance settings โ€‹

Enable OPcache for faster PHP execution:

ini
opcache.enable = 1
opcache.memory_consumption = 256
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.revalidate_freq = 60

PHP modes โ€‹

Plesk supports multiple PHP execution modes:

ModeDescriptionRecommended
FPMSeparate process pool per subscriptionYes โ€” best isolation
FPM + ApacheFPM with Apache as reverse proxyYes on Nginx+Apache setups
CGISpawns new process per requestNo โ€” slow
FastCGIPersistent FastCGI processAcceptable

Set under PHP Settings โ†’ PHP execution mode.

Python applications โ€‹

Plesk supports hosting Python (Django, Flask) apps via Passenger:

  1. Subscription โ†’ Websites & Domains โ†’ Python
  2. Click Enable
  3. Set the Python version and application root
  4. Set the startup file (e.g. passenger_wsgi.py)
  5. Click OK

Example passenger_wsgi.py for Flask: โ€‹

python
import sys
import os

INTERP = "/var/www/vhosts/yourdomain.com/venv/bin/python"
if sys.executable != INTERP:
    os.execl(INTERP, INTERP, *sys.argv)

from app import app as application

Restart the app after code changes: Python โ†’ Restart.

Managed hosting that actually manages.