Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
Where are php.ini
files (PHP configuration files) for a domain or global PHP handler located on the Plesk server? And how to edit them?
Answer
Note: If one of the menus or options is not available on your Plesk installation, please contact your server's administrator or hosting provider support, account access is limited.
-
By clicking Domains > example.com > PHP Settings > View the phpinfo() page it is possible to see all the PHP configuration for this domain.
-
To edit it, just configure the required options in Domains > example.com > PHP Settings and add all the required PHP settings:
-
Global PHP handler configuration file is stored in Tools and Settings > PHP Settings > click on a PHP handler > php.ini tab:
-
Edit the required options and click OK
Note: Some of the options may be hidden by Plesk administrator. Upgrade to the latest Plesk version to be able to edit these options in Plesk interface.
If it is required to make changes for few subscriptions, it is easy to do via Service Plan.
-
Assign all the required subscriptions in Service Plans
-
Go to PHP Settings and after changing them click Update & Sync.
It is required to connect to the server using SSH or RDP connection
PHP uses different configuration files depending on a handler type. When the changes are made in the web interface, the following configuration files on a server are updated on Linux:
Domain's php.ini
It depends on that PHP Handler is set in Plesk > Domains > example.com > Hosting Settings:
-
Nginx + PHP-FPM by OS vendor:
Domain's php.ini:
/etc/php*/fpm/fpm.d/example.com.conf
(for Ubuntu) or/etc/php-fpm.d/example.com.conf
(for Centos)Global PHP handler (system PHP):
/etc/php.ini
-
Nginx + PHP-FPM supplied with Plesk:
Domain's php.ini:
/opt/plesk/php/<php_verion>/etc/php-fpm.d/example.com.conf
Global PHP handler:
/opt/plesk/php/<php_verion>/etc/php.ini
-
Apache + FastCGI:
Domain's php.ini:
/var/www/vhosts/system/example.com/etc/php.ini
-
Apache + PHP_mod:
Domain's php.ini:
/var/www/vhosts/system/example.com/conf/httpd.conf
Global php.ini
-
Any PHP by OS vendor
Global PHP handler (system PHP):
/etc/php.ini
-
Any PHP version by Plesk:
Global PHP handler:
/opt/plesk/php/<php_verion>/etc/php.ini
Windows
All the PHP configuration files are stored in "%plesk_dir%"/Additional/PHP*
Domain's php.ini file is being generated after any changes in PHP settings and can be found by the following path C:\Inetpub\vhosts\example.com\httpdocs\.user.ini
Comments
0 comments
Please sign in to leave a comment.