• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/
  • On Plesk for Linux mod_status is disabled on upgrades to improve Apache security.
    This is a one-time operation that occurs during an upgrade. You can manually enable mod_status later if needed.

Question Making site specific PHP Additional Configuration Directives survive subscription synchronization.

ScottGoddard

Basic Pleskian
I use PHP Additional Configuration Directives (within the PHP settings page of the site) to set various environment variables that are unique to that site/domain/sub-domain.

As an example, I can use the following to set whether the site is dev, test, or prod, which allows me to keep one code base that behaves correctly for its environment:
Code:
[php-fpm-pool-settings]
env[APP_ENV] = prod

I can use this to securely set other site specific variables.

This works great...until you have to sync the subscription - at which point all PHP Additional Configuration Directives are removed. Even just changing the subscription expiry date then requires a resync, resulting in the loss of the environment variables.

I am aware I could set up a custom subscription or an 'add on' to achieve this (as pointed out here: Issue - Additional configuration directives in PHP Settings are overwritten during a service package synchronization) but doing this for every single domain and sub domain this seems ludicrously long winded and complicated way to achieve what should be simple.

Am I missing something obvious? Please don't suggest .env files as these can be a pain and are easily mishandled (yes, I know that `env[APP_ENV]` can also be mishandled and revealed if care is not taken, but I find them more secure, easier to work with, more robust and just all round better.)
 
Back
Top