Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to change PHP parameter for all domains on Plesk server?

 
domainsextensionsgolinuxmysql

Question

How to change PHP parameter for all domains?

For example, change open_basedir parameter for all domains?

Answer

Warning: current example is for changing open_basedir value to none. Select another value if needed.

For already created domains:

Note: the further instructions are intended for server administrators with direct RDP/SSH access to the server.
If direct SSH/RDP access to the server is not possible, contact server administrator for further assistance.

Click here to reveal information for Linux.

  1. Connect to the server using SSH.

  2. Create a list of domains:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql psa -uadmin -Ne"select name from domains where htype='vrt_hst'" > /root/list.txt

  3. Create a php.txt file with the needed open_basedir configuration, e.g:

    open_basedir = none

    Note: the above configuration depending on the needs.

  4. Run the following command to apply settings from php.txt created on the previous step:

    # cat /root/list.txt | while read dom; do /usr/local/psa/bin/site --update-php-settings $dom -settings /root/php.txt;done

Click here to reveal information for Windows.

  1. Connect to the server via RDP.

  2. Create a list of domains:

    C:> plesk db -Ne"select name from domains where htype='vrt_hst'" > C:list.txt

  3. Create a php.txt file with the needed open_basedir configuration, e.g:

    open_basedir = none

    Note: the above configuration depending on the needs.

  4. Run the following command to apply settings from php.txt created on the previous step:

    C:> for /f "skip=1 tokens=1" %a in (C:list.txt) do @"%plesk_cli%site.exe" --update-php-settings %a -settings C:php.txt

 

 

For new domains:

Set up open_basedir value to none at Service Plans > plan_name > PHP Settings.

Note: Service Plans are available for Web Host and Web Pro editions only.

Alternatively, modify panel.ini configuration file:

  1. Log into Plesk.

  2. Install the Panel.ini Editor extension in Plesk How to manage Plesk extensions (install, disable, remove, update)

  3. Go to Plesk > Extensions > My Extensions > Panel.ini Editor > Go To Extension > Editor.

  4. Set the default open_basedir to none:

    if there is no [php] section in Panel.ini, add the following:

    [php]
    settings.general.open_basedir.default="none"

    Otherwise, add the directive to [php] section:

    settings.general.open_basedir.default="none"

  5. Click Save:
    editdefphp.jpg

Additional information

PHP parameters customization.

How to change/customize PHP settings?

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Check Open Ports in Linux (Simple Commands & Tools)

Read More »

Linux Logs Explained

Read More »

How to Host a Go App on Plesk

Read More »
Knowledge Base

How to find and edit PHP configuration files in Plesk for a domain or for global PHP handler

Read More »

How to change the default mailbox size in Plesk

Read More »

ModSecurity rule-set activation/update fails in Plesk: Unable to find row with id X in domains table

Read More »

How to change a database user password in Plesk

Read More »

Hosting Wiki

  • Django
  • Server Redundancy
  • Linux Containers
  • Google Cloud CDN
  • Bare Metal Server
  • MySQL
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • MongoDB
  • SQL
  • Domain
  • Plesk
  • Web Server
  • DNS Server
  • SSH
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family