You can customize your PHP settings using a .user.ini file in your public_html directory.
This allows you to override default PHP settings and tailor them to your specific needs.
Creating a .user.ini file:
1. Log in to your cPanel account.
2. Navigate to the File Manager.
3. Go to the public_html directory.
4. Click on "New File" and name it ".user.ini" (including the dot).
5. Edit the file and add your custom PHP settings (e.g., upload_max_filesize, post_max_size, memory_limit).
Example .user.ini file:
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 256M
max_execution_time = 300
Note:
- The .user.ini file only affects the directory it's placed in and its subdirectories.
- You can also create a .user.ini file in subdirectories to override settings for specific areas of your website.
- Changes to the .user.ini file may take up to 10 minutes to take effect.
Common PHP settings to customize:
- upload_max_filesize: Maximum file size for uploads.
- post_max_size: Maximum size of post data.
- memory_limit: Maximum amount of memory a script can use.
- max_execution_time: Maximum time a script can run.