Customise the php.ini file settings in Code Editor

1. Log in to cPanel, if you haven’t already done so
2. If you haven’t already done so, create a php.ini file or locate an existing php.ini file in the File Manager.
3. Select the php.ini file by clicking on it once and then click Code Editor

php guide

4. Ensure you have the correct file selected and then click Edit

php guide

5. You may now add your code or make changes you require.




Below are some examples of the changes that can be made along with the syntax to use. The notes in brackets are not part of the syntax:

post_max_size = 20M (Maximum size of POST data that PHP will accept, in megabytes) 
upload_max_filesize = 20M (Maximum allowed size for uploaded files, in megabytes) 
max_execution_time = 30 (Maximum execution time of each script, in seconds) 
max_input_time = 60 (Maximum amount of time each script may spend parsing request data, in seconds) 
memory_limit = 8M (Maximum amount of memory a script may consume, in megabytes) 
magic_quotes_gpc = Off (Magic quotes for incoming GET/POST/Cookie data) 
magic_quotes_runtime = Off (Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.) 


6. Once you have finished editing your php.ini file, click Save Changes from the top right of the editing window. Important note: The php.ini file customisations will only apply to the directory it is placed in. In order to overcome this, you will need to make your php.ini file apply to all folders and sub folders (recursive). To do this follow this guide:
**Modifying the .htaccess file to use a custom php.ini file throughout your website

  • 0 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟

مقالات مشابهة

How To Free Up Disk Space On cPanel Accounts ?

Having too much information stored on your server can cause all sorts of issues. If you get a...

Force Password Reset cPanel/WHM

Force Password in cPanel Servers are for security purpose for an certain number of days the...

How to Change the password on an FTP account in cPanel?

Login into cPanel using provided URL and its credentials Go to Files section. Click on FTP...

Custom PHP Limits using .user.ini

To add custom php limits like memory limit,Upload limit You can do it from .user.ini file Create...

How to scan Mail/Entire Home Directory/Public Web Space/Public FTP Space from cPanel?

1. Login in cPanel using provided URL and its credentials. 2. Click on Virus Scanner option. 3....