{"id":1004,"date":"2018-11-25T09:08:40","date_gmt":"2018-11-25T02:08:40","guid":{"rendered":"https:\/\/www.whplus.com\/blog\/?p=1004"},"modified":"2018-11-25T09:12:14","modified_gmt":"2018-11-25T02:12:14","slug":"edit-default-php-fpm-settings","status":"publish","type":"post","link":"https:\/\/www.whplus.com\/blog\/2018\/11\/25\/edit-default-php-fpm-settings.html","title":{"rendered":"Edit Default PHP-FPM Settings"},"content":{"rendered":"<p>If you have many cPanel accounts, you may prefer to change the default settings for newly created cPanel accounts.<\/p>\n<ol>\n<li>As root, SSH into your server or launch WHM terminal.<\/li>\n<li>Create a system_pool_defaults.yaml file in the \/var\/cpanel\/ApachePHPFPM directory. To do this using nano, type the following:\n<p><code>nano \/var\/cpanel\/ApachePHPFPM\/system_pool_defaults.yaml<\/code><\/p>\n<p>Add the following to the new file:<\/p>\n<p><code>pm_max_children: 500<br \/>\npm_max_requests: 2000<br \/>\npm_min_spare_servers: 1<br \/>\npm_max_spare_servers: 25<br \/>\npm_process_idle_timeout: 150 <\/code><\/p>\n<p>pm_max_children: Max number of child processes<br \/>\npm_max_requests: Number of requests a child process executes before respawning.<br \/>\npm_min_spare_servers: Minimum idle server processes<br \/>\npm_max_spare_servers: Maximum idle server processes<br \/>\npm_process_idle_timeout: Time until an idle process is killed in s(econds), m(inutes), m(inutes), h(ours), or d(ays).<\/li>\n<li>Save and exit the file. Using nano, press Control and x for the save prompt before exiting. Press y, then Enter ? to save the file.<\/li>\n<li>Rebuild PHP-FPM using the following command:\n<p><code>\/usr\/local\/cpanel\/scripts\/php_fpm_config --rebuild<\/code><\/li>\n<li>Restart PHP-FPM using the following command:\n<p><code>\/scripts\/restartsrv_apache_php_fpm<\/code><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>If you have many cPanel accounts, you may prefer to change the default settings for newly created cPanel accounts. As root, SSH into your server or launch WHM terminal. Create a system_pool_defaults.yaml file in the \/var\/cpanel\/ApachePHPFPM directory. To do this using nano, type the following: nano \/var\/cpanel\/ApachePHPFPM\/system_pool_defaults.yaml Add the following to the new file: pm_max_children:\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.whplus.com\/blog\/2018\/11\/25\/edit-default-php-fpm-settings.html\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1004","post","type-post","status-publish","format-standard","hentry","category-tutorial"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/posts\/1004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/comments?post=1004"}],"version-history":[{"count":4,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/posts\/1004\/revisions"}],"predecessor-version":[{"id":1008,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/posts\/1004\/revisions\/1008"}],"wp:attachment":[{"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/media?parent=1004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/categories?post=1004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/tags?post=1004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}