How to fix: 'The uploaded file exceeds the upload_max_filesize' error
Did you try to install one of our themes/plugins and got the following error:
The uploaded file exceeds the upload_max_filesize directive in php.ini.
This happens because of the upload file limits of your hosting provider. Now the best way to solve this issue will be for you to contact your hosting provider and ask him to increase the file size limit. However, you can also try to solve this problem on your own using one of these tricks:
1. Using functions.php file:
You can try to solve this issue by adding the following code to your child theme's functions.php file:
@ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '64M'); @ini_set( 'max_execution_time', '300' );
It worked? If yes, then feel free to solve the tab. If not, then try the second trick...
2. Create or Edit an existing PHP.INI file:
Add the following code to your php.ini file, which you can find in the root directory. If there's not one then just create one:
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
Working for you now? If not then there's also a 3rd trick...
3. Using .htaccess:
Open or create the .htaccess file in the root folder and add the following code:
php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300
I hope it's working at this point. If it's still not working then pick up your phone and call your hosting provider. :)