How to increase php max upload size?
If you need to increase limits like upload size or execution time in your PHP settings, here are two simple methods to do it directly from your cPanel account.
Method 1: Modify PHP Configuration Using PHP Selector
Section titled “Method 1: Modify PHP Configuration Using PHP Selector”Log in to cPanel
Section titled “Log in to cPanel”- Open your web browser and go to your cPanel login page.
- Enter your username and password to access your dashboard.
Access PHP Selector
Section titled “Access PHP Selector”- In the “Software” section of cPanel, click on “Select PHP Version.”
Choose “Options”
Section titled “Choose “Options””- After opening PHP Selector, click on the “Options” tab.
Adjust PHP Settings
Section titled “Adjust PHP Settings”- Find the following PHP directives and increase their values as needed:
upload_max_filesize = 64Mpost_max_size = 64Mmax_execution_time = 300max_input_time = 300Save Changes
Section titled “Save Changes”- Click “Apply” to save your new PHP settings.
Method 2: Modify PHP Configuration Using .htaccess File
Section titled “Method 2: Modify PHP Configuration Using .htaccess File”Access File Manager
Section titled “Access File Manager”- In the cPanel dashboard, go to the “Files” section.
- Click on “File Manager.”
Navigate to Root Directory
Section titled “Navigate to Root Directory”- Go to your website’s root directory, usually named public_html.
Edit .htaccess File
Section titled “Edit .htaccess File”- Find the .htaccess file. If you can’t see it:
Click on “Settings” at the top-right.
Section titled “Click on “Settings” at the top-right.”- Check “Show Hidden Files (dotfiles)” to reveal it.
- Right-click the .htaccess file and select “Edit.”
Add PHP Configuration Lines
Section titled “Add PHP Configuration Lines”- Add the following lines to the file:
php_value upload_max_filesize 64Mphp_value post_max_size 64Mphp_value max_execution_time 300php_value max_input_time 300Save Changes
Section titled “Save Changes”- Click “Save Changes” to apply the new PHP limits.