At times, low file upload size limit can stop you from uploading files via media uploader, or installing plugins and themes. When using the free version of the WordPress Backup & Migration plugin, it is likely that large files need to be uploaded for migration purpose . However, the default value of max. file upload size in WordPress is approximated to 1.5MB.
Therefore, it is essential to know how the default WordPress file upload size can be improved. Here are the 4 ways to do so.
1. Update .htaccess file
php_value upload_max_filesize 128M php_value post_max_size 128M php_value memory_limit 256M php_value max_execution_time 300 php_value max_input_time 300
Change the numbers to the values that you need. The max execution time and max input time values are in seconds and might need to be increased further if your internet connection is slow.
2. Create or Edit an existing PHP.INI file
For this method you will need to access your WordPress site’s root folder by using FTP or File Manager app in your hosting account’s cPanel dashboard.
In most cases if you are on a shared host, then you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini and upload it in the root folder. In that file add the following code:
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
This method is reported to work for many users. Remember if 64 doesn’t work, then try 10MB (sometimes that work).
3. Update wp-config.php file
@ini_set( 'upload_max_filesize' , '128M' ); @ini_set( 'post_max_size', '128M'); @ini_set( 'memory_limit', '256M' ); @ini_set( 'max_execution_time', '300' ); @ini_set( 'max_input_time', '300' );
4. Contact hosting provider
Reach over to the customer support of your hosting provider and ask them to increase these limits for you.
- Was this article helpful?
- Yes, thanks!Not really
May 14, 2022