How to create a custom php.ini file?

Both cPanel and SPanel have easy-to-understand tools that let you edit your website’s PHP.ini file. Let’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 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 MultiPHP INI Editor. You can find it under the Software section.

How to create a custom php.ini file?, Editing the PHP.ini file in cPanel

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.

How to create a custom php.ini file?, Editing the PHP.ini file in cPanel 2

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 Home Directory from the drop down menu. Then make the necessary changes from the options below and click on the Apply button. That will create your custom php.ini with the desired configuration.

If you want to change a php option that is not present in the basic mode editor then you need to use the Editor Mode. 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’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.

How to create a custom php.ini file?, Editing the PHP.ini file in cPanel 3

Don’t forget to click on the Save button to apply the changes.

Editing the PHP.ini file in SPanel

Modifying the PHP.ini file on an SPanel server is just as easy. All you need to do is log into SPanel’s User Interface at (don’t forget to replace with your actual domain). Scroll down to the Tools section and click PHP INI Editor

How to create a custom php.ini file?, Editing the PHP.ini file in SPanel

From the drop down at the top, you can decide which domain you want to edit.

Once again, you have a Basic Editor where you can manage frequently modified parameters with the help of toggle switches, drop-down menus, and fields.

How to create a custom php.ini file?, Editing the PHP.ini file in SPanel 2

You also have an Advanced Editor where you can add your custom rules to the PHP.ini file.

How to create a custom php.ini file?, Editing the PHP.ini file in SPanel 3

Was this helpful?

What’s your goal today?

1. Find the right Web hosting solution

If you’re looking for industry-leading speed, ease of use and reliability Try ScalaHosting with an unconditional money-back guarantee.

2. Make your website lighting fast

We guarantee to make your WordPress site load in less than 2 seconds on a managed VPS with ScalaHosting or give your money back. Fill out the form, and we’ll be in touch.

Please enter a valid name
Please enter a valid website
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

3. Streamline your clients’ hosting experience

If you’re a web studio or development agency hosting more than 30 websites, schedule a call with Vlad, our co-founder and CTO, and see how we can deliver unmatched value to both your business and your clients.


Need a custom cluster or professional advice?

Book a meeting and get a free 30-minute consultation with Vlad, co-founder & CTO of Scala Hosting, who will help you select, design and build the right solution - from a single data center cluster to a multi-region & multi-datacenter high availability cluster with hundreds of servers.

Book a free consultation

4. Learn how to grow your website in 2024

An all-star team of SEO and web influencers are sharing their secret knowledge for the first time in years. Learn about the future of SEO, Web Design best practices and the secrets to getting the foundation for your website to thrive. Watch the exclusive webinar.

An Exclusive Insiders Look Behind The SEO and Web Development Curtain


Working in the web hosting industry for over 13 years, Rado has inevitably got some insight into the industry. A digital marketer by education, Rado is always putting himself in the client's shoes, trying to see what's best for THEM first. A man of the fine detail, you can often find him spending 10+ minutes wondering over a missing comma or slightly skewed design.