Increasing the PHP upload limit on a cPanel server involves adjusting certain settings either through the cPanel interface or by directly editing configuration files. Here's how you can do it:
Method 1: Using cPanel Interface
- Log in to cPanel: Log in to your cPanel account using your credentials.
- Navigate to "Select PHP Version": Look for the "Select PHP Version" icon within the "Software" section of cPanel and click on it.
- Click on Options Tab and Adjust PHP Settings:
- Find the "upload_max_filesize" setting.
- Increase its value to your desired limit. For example, set it to "64M" for a 64MB limit.
- Optionally, you can also increase "post_max_size" to ensure it's higher than "upload_max_filesize".
- Save Changes: After making the necessary adjustments, click on the "Apply" button to save the changes.
- Verify Changes: Verify that the changes have taken effect by uploading a file through your PHP script.
Method 3: Editing .htaccess File
- Access File Manager: Follow steps 1 and 2 from Method 2 to access the File Manager in cPanel.
- Locate .htaccess File: Look for the .htaccess file in the root directory of your website. If it's not there, you may need to create one.
- Edit .htaccess File: Right-click on the .htaccess file and select "Edit" or "Code Edit".
- Add PHP Settings:
php_value upload_max_filesize 64Mphp_value post_max_size 64M
- Save Changes: After adding these lines, save the .htaccess file.
- Verify Changes: Test the upload functionality on your website to confirm that the new upload limit is applied.