• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question How to change default PHP settings

nuno.pereira

New Pleskian
Server operating system version
CentOS Linux release 7.9.2009 (Core)
Plesk version and microupdate number
Plesk Obsidian Version 18.0.46
I want to change the default PHP settings on all PHP versions, for the parameters configurable per domain, in particular the disable_functions, as instructed in How to customize PHP settings in Plesk.

I've followed the procedure at Customizing PHP Parameters, in particular adding the following lines

INI:
[php]
settings.performance.disable_functions.default=opcache_get_status,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,mail

For the current domains, if the settings aren't equal to this, then the "Reset to default" is available and after clicking it this new setting is set.

The issue is that for new domains the value is only opcache_get_status.

Is there a way to change the default for new domains?
 
What about defining "disable_functions" in "PHP Settings" of your Service Plan? This setting will be applied to the newly created domain.
If I do that, does it affects the new domains (and subscriptions?) associated with the Service Plan, or just the new domains?
 
It affects all new and existing subscriptions and their domains associated with the service plan.

If you add this under Service Plans and hit the Update & Sync button, it will apply the additional PHP directives to all existing subscriptions and sites under that plan, and all new ones will have them by default too.
  • Locked subscriptions and their domains, new or existing, won't be altered; the change would need to be made on the subscription directly.
  • Syncing any unlocked Subscriptions with their Plan will overwrite the additional PHP directives with whatever's on the plan.

This and more is in the PHP Management Documentation.
 
If I do that, does it affects the new domains (and subscriptions?) associated with the Service Plan, or just the new domains?
Yes, this changed setting will be synchronized to existing subscriptions too.
To prevent this, you can create Add-on Service Plan ("Add an Add-on" button) with this particular disable_functions setting and choose this Service Plan addon when you create new subscriptions. Existing subscriptions will not be affected until you apply this Add-on plan to them.
 
Back
Top