RemarkableCloud

PHP & Python Settings in Plesk

How to switch PHP versions per domain in Plesk, customize php.ini values, set up Python applications, and manage runtime settings.

Switch PHP version per domain

  • Open the subscription → PHP Settings (or Websites & Domains → PHP Settings).
  • Select the PHP version from the dropdown: available versions depend on what's installed on the server.
  • 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:
    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:

    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:

    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.

    Still stuck? Ask a human, we answer in minutes.