There are 4 ways that you can choose to increase the maximum upload file size in WordPress.
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. 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' );
3. Contact hosting provider
Reach over to the customer support of your hosting provider and ask them to increase these limits for you
4. Use plugin
Do you want to increase the maximum file upload size in WordPress. Some times low file upload size limit can stop you from uploading files via media uploader, or install plugins and themes. In this article, we will show you how to easily increase the maximum file upload size in WordPress to fix those issues.
Note: This is an intermediate level tutorial. It may not work with some shared hosts in which case you would have to ask your hosting service provider for support. We use HostGator, and they are more than helpful when it comes to issues like this.
Subscribe to WPBeginner
If you don’t like the video or need more instructions, then continue reading.
How to Check Your Maximum File Upload Size Limit in WordPress?
WordPress will automatically show the maximum file upload size limit when you are uploading images or media. To check it you can simply go to Media » Add New page and you will see the maximum file uplaod size limit for your WordPress site.
1: Theme Functions File
There are cases where we have seen that just by adding the following code in theme’s functions.php file, you can increase the upload size:
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:
This method is reported to work for many users. Remember if 64 doesn’t work, then try 10MB (sometimes that work).
3. htaccess Method
Some people have tried using the .htaccess method where by modifying the .htaccess file in the root directory, you can increase the maximum upload size in WordPress. Edit the .htaccess file in your WordPress site’s root folder and add the following code:
Again, it is important that we emphasize that if you are on a shared hosting package, then these techniques may not work. In that case, you would have to contact your web hosting provider to increase the limit for you.
We hope this article helped you increase the maximum file upload size in WordPress. If you are still having issues, then follow the steps in our WordPress troubleshooting guide to fix it.