Hello Devs,

In this tutorial, we are going to discover how to create custom php.ini file in cpanel.

Given below are two examples for php and one example for laravel project.


Path: public_html/mypro.com/index.php

Create File Path: public_html/mypro.com/.user.ini

Solution 1

memory_limit = 148M
max_input_vars = 4000
upload_max_filesize = 120M
post_max_size = 120M
max_execution_time = 250



Solution 2


Create File Path: public_html/mypro.com/php.ini

memory_limit = 148M
max_input_vars = 4000
upload_max_filesize = 120M
post_max_size = 120M
max_execution_time = 250

Then check:

<?php phpinfo(); ?>



Solution 3 : 

In Laravel Project Create File Path: public_html/domain_name/public/php.ini

memory_limit = 148M
max_input_vars = 4000
upload_max_filesize = 120M
post_max_size = 120M
max_execution_time = 250


I hope this example helps you.