Skip to content

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”
  • Open your web browser and go to your cPanel login page.
  • Enter your username and password to access your dashboard.
  • In the “Software” section of cPanel, click on “Select PHP Version.”
  • After opening PHP Selector, click on the “Options” tab.
  • Find the following PHP directives and increase their values as needed:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 300
  • 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”
  • In the cPanel dashboard, go to the “Files” section.
  • Click on “File Manager.”
  • Go to your website’s root directory, usually named public_html.
  • Find the .htaccess file. If you can’t see it:
  • Check “Show Hidden Files (dotfiles)” to reveal it.
  • Right-click the .htaccess file and select “Edit.”
  • Add the following lines to the file:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
  • Click “Save Changes” to apply the new PHP limits.