[php] How to access the php.ini from my CPanel?

I want to change the limit of the php POST array from 1000 to 6000 . Is there any way to do that ? i search about that and i found that i should change some variables in php.ini but the problem is that i did not find the directory of the file in my cpanel :

Your server's php.ini file is located at /usr/local/lib/php.ini.

This line is from the CPanel documentation but i could not find this directory in my cpanel even after i show the hidden files???? can anybody help me locating this file?

This question is related to php post cpanel

The answer is


Search for "php version" at the bottom of the cpanel

Select PHP Version -> Switch to Php Options -> Change the Value -> save.


Cpanel 60.0.26 (Latest Version) Php.ini moved under Software > Select PHP Version > Switch to Php Options > Change Value > save.


Go to main screen. Under 'Software/Services' > 'php.ini EZConfig'.


In cPanel search for php, You will find "Select PHP version" under Software.

Software -> Select PHP Version -> Switch to Php Options -> Change Value -> save.


You could try to find it via the command line.

find / -type f -name "php.ini"

Or you could add the following to a .htaccess file in the root of your site.

php_value max_input_vars 6000
php_value suhosin.get.max_vars 6000
php_value suhosin.post.max_vars 6000
php_value suhosin.request.max_vars 6000

If you're on a shared hosting environment you won't have access to the php.ini to make these changes, if you need access, a virtual private server (VPS) or a dedicated server may be a better option if you're confident in managing it yourself.

Alternatively if you create a new file called .htaccess in your root of your web directory (Ensure it doesn't contain a .txt extension if using notepad to create the file) and copy something like this inside.

php_value settingToChange 6000

This will only work if your hosting provider let's you override the certain config value. Best to ask if it doesn't work after trying.


You cant do it on shared hosting , Add ticket to support of hosting for same ( otherwise you can look for dedicated server where you can manage anything )


I had the same issue in cPanel 92.0.3 and it was solved through this solution:

In cPanel go to the below directory

software --> select PHP version--> option--> upload_max_filesize 

Then choose the optional size to upload your files.


Examples related to php

I am receiving warning in Facebook Application using PHP SDK Pass PDO prepared statement to variables Parse error: syntax error, unexpected [ Preg_match backtrack error Removing "http://" from a string How do I hide the PHP explode delimiter from submitted form results? Problems with installation of Google App Engine SDK for php in OS X Laravel 4 with Sentry 2 add user to a group on Registration php & mysql query not echoing in html with tags? How do I show a message in the foreach loop?

Examples related to post

How to post query parameters with Axios? How can I add raw data body to an axios request? HTTP POST with Json on Body - Flutter/Dart How do I POST XML data to a webservice with Postman? How to set header and options in axios? Redirecting to a page after submitting form in HTML How to post raw body data with curl? How do I make a https post in Node Js without any third party module? How to convert an object to JSON correctly in Angular 2 with TypeScript Postman: How to make multiple requests at the same time

Examples related to cpanel

Run CRON job everyday at specific time #1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation #1273 - Unknown collation: 'utf8mb4_unicode_ci' cPanel onchange file input change img src and change image color How to set a cron job to run every 3 hours How to access the php.ini from my CPanel? How to increase Maximum Upload size in cPanel? Using CRON jobs to visit url? How to create tar.gz archive file in Windows? Run a PHP file in a cron job using CPanel