{"id":233,"date":"2017-01-27T16:58:35","date_gmt":"2017-01-27T14:58:35","guid":{"rendered":"https:\/\/www.scalahosting.com\/kb\/?p=233\/"},"modified":"2022-05-11T18:00:40","modified_gmt":"2022-05-11T15:00:40","slug":"create-custom-php-ini-file","status":"publish","type":"post","link":"https:\/\/www.scalahosting.com\/kb\/create-custom-php-ini-file\/","title":{"rendered":"How to create a custom php.ini file?"},"content":{"rendered":"\n<p>Both cPanel and SPanel have easy-to-understand tools that let you edit your website&#8217;s <strong>PHP.ini file<\/strong>. Let&#8217;s take a closer look at what you need to do exactly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Editing the PHP.ini file in cPanel<\/strong><\/h2>\n\n\n\n<p>On newer servers running EasyApache4 adding a custom php.ini for your <a href=\"https:\/\/www.scalahosting.com\/web-hosting-for-small-business.html\" target=\"_blank\" rel=\"noopener noreferrer\">web hosting plan<\/a> is a pretty easy process. You can create and manage your PHP settings from the control panel cPanel. To access the php.ini manager in cPanel you need to login to the control panel and click on the&nbsp;<strong>MultiPHP INI Editor<\/strong>. You can find it under the&nbsp;<strong>Software<\/strong> section.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"206\" src=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/custom-php-ini-manage.png\" alt=\"How to create a custom php.ini file?, Editing the PHP.ini file in cPanel\" class=\"wp-image-234\" srcset=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/custom-php-ini-manage.png 1024w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/custom-php-ini-manage-300x60.png 300w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/custom-php-ini-manage-768x155.png 768w\" sizes=\"(max-width: 361px) 660px, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 910px, 1140px\" \/><\/figure>\n\n\n\n<p>Once you click on it a new screen will load and it will allow you to manage your custom php.ini using the Basic Mode or Editor Mode. The Basic mode includes part of the PHP directives. Those are the most frequently used and modified by customers.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"548\" src=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/edit-custom-php-ini.png\" alt=\"How to create a custom php.ini file?, Editing the PHP.ini file in cPanel 2\" class=\"wp-image-235\" srcset=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/edit-custom-php-ini.png 1024w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/edit-custom-php-ini-300x161.png 300w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/edit-custom-php-ini-768x411.png 768w\" sizes=\"(max-width: 361px) 660px, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 910px, 1140px\" \/><\/figure>\n\n\n\n<p>The Basic mode editor allows you to select which domain name you want to set the custom php.ini for. You can also create a custom php.ini for your entire web hosting plan. To do that make sure to select the&nbsp;<strong>Home Directory<\/strong> from the drop down menu. Then make the necessary changes from the options below and click on the&nbsp;<strong>Apply<\/strong> button. That will create your custom php.ini with the desired configuration.<\/p>\n\n\n\n<p>If you want to change a php option that is not present in the basic mode editor then you need to use the&nbsp;<strong>Editor Mode<\/strong>. Click on it and you will see a form with a text box where you can manually enter all directives you want to change. Please note you don&#8217;t need to copy\/paste the entire php.ini config file in there. It is enough to specify just the config option you want to change. For example, if you want to increase the maximum upload file size in php you need to enter the following.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/edit-phpini-editor-mode.png\" alt=\"How to create a custom php.ini file?, Editing the PHP.ini file in cPanel 3\" class=\"wp-image-236\" srcset=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/edit-phpini-editor-mode.png 1024w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/edit-phpini-editor-mode-300x168.png 300w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/edit-phpini-editor-mode-768x429.png 768w\" sizes=\"(max-width: 361px) 660px, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 910px, 1140px\" \/><\/figure>\n\n\n\n<p>Don&#8217;t forget to click on the&nbsp;<strong>Save<\/strong> button to apply the changes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Editing the PHP.ini file in SPanel<\/strong><\/h2>\n\n\n\n<p>Modifying the PHP.ini file on an SPanel server is just as easy. All you need to do is log into SPanel&#8217;s User Interface at <em><strong>https:\/\/yourdomain.com\/spanel <\/strong><\/em>(don&#8217;t forget to replace <em>yourdomain.com <\/em>with your actual domain). Scroll down to the <strong>Tools <\/strong>section and click <strong>PHP INI Editor<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"844\" height=\"306\" src=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/363.png\" alt=\"How to create a custom php.ini file?, Editing the PHP.ini file in SPanel\" class=\"wp-image-4062\" srcset=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/363.png 844w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/363-300x109.png 300w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/363-768x278.png 768w\" sizes=\"(max-width: 361px) 660px, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 910px, 1140px\" \/><\/figure><\/div>\n\n\n\n<p>From the drop down at the top, you can decide which domain you want to edit.<\/p>\n\n\n\n<p>Once again, you have a <strong>Basic Editor<\/strong> where you can manage frequently modified parameters with the help of toggle switches, drop-down menus, and fields.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"1024\" height=\"652\" src=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/364-1024x652.png\" alt=\"How to create a custom php.ini file?, Editing the PHP.ini file in SPanel 2\" class=\"wp-image-4063\" srcset=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/364-1024x652.png 1024w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/364-300x191.png 300w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/364-768x489.png 768w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/364.png 1273w\" sizes=\"(max-width: 361px) 660px, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 910px, 1140px\" \/><\/figure><\/div>\n\n\n\n<p>You also have an <strong>Advanced Editor<\/strong> where you can add your custom rules to the PHP.ini file.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"1024\" height=\"414\" src=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/365-1024x414.png\" alt=\"How to create a custom php.ini file?, Editing the PHP.ini file in SPanel 3\" class=\"wp-image-4064\" srcset=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/365-1024x414.png 1024w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/365-300x121.png 300w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/365-768x311.png 768w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2017\/01\/365.png 1278w\" sizes=\"(max-width: 361px) 660px, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 910px, 1140px\" \/><\/figure><\/div>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Both cPanel and SPanel have easy-to-understand tools that let you edit your website&#8217;s PHP.ini file. Let&#8217;s take a closer look at what you need to do exactly. Editing the PHP.ini file in cPanel On newer servers running EasyApache4 adding a custom php.ini for your web hosting plan is a pretty easy process. You can create [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_analysis_target_kw":"","footnotes":""},"categories":[34],"tags":[47],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-web-hosting","tag-custom-php-ini"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":8,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":4446,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/233\/revisions\/4446"}],"wp:attachment":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}