How to make php.ini recursive in .htaccess file

php.ini is the file for controlling all the php configuration settings of a server for a particular hosting account.

By default, the php.ini file is non-recursive that means if you modify the php.ini file it will not affect any subdirectories or folders that are present in your file manager of your hosting account.

So by making php.ini recursive, you can easily apply the changes or modifications that you have done in your php.ini file to all your subdirectories in the public_html folder of your cPanel.

For making php.ini file recursive in the .htaccess file please follow the below mentioned steps:

1) Login to your cPanel.

2) Scroll down to Files section and click on “File Manager” icon.

File Manager in cpanel

After clicking on File Manager you will be redirected to a page where a list of files and folders in your hosting account is visible on screen.

3) Now you need to navigate to public_html folder.

4) Locate the php.ini file if it present or contact your Web hosting provider to upload php.ini file in your hosting account .

5) After locating or uploading the php.ini file, you need to navigate to the .htaccess file. Select the htaccess file and click on Edit icon on the top of the navigation bar.

6) Now you need to enter the following code on the top of the file:

suPHP_ConfigPath /home/username/public_html

Note: In place of "username" you need to enter the username of your cPanel.

7) Click on Save button for making the changes.

After completing all these steps your php.ini is being made recursive.