How to Increase the Maximum File Upload Size in WordPress

Do you wish to raise WordPress's maximum file upload size? Low file upload size limits can sometimes prevent you from uploading files using media uploader or installing plugins and themes. In this article, we will demonstrate how to simply increase the maximum file upload size in WordPress to resolve those concerns.


How to Check Your Maximum File Upload Size Limit in WordPress?When you upload photos or media to WordPress, the maximum file upload size restriction will be displayed automatically. Simply navigate to the Media » Add New tab to view the maximum file upload size restriction for your WordPress site.

1: Theme Functions FileWe've encountered circumstances where simply adding the following code to the theme's functions.php file can increase the upload size:


@ini_set( 'upload_max_size' , '64M' );@ini_set( 'post_max_size', '64M');@ini_set( 'max_execution_time', '300' );


2. Create or Edit an existing PHP.INI file

You will need to access your WordPress site's root folder through FTP or the File Manager program in your hosting account's cPanel panel for this technique.
In most circumstances, if you're using a shared host, you won't find a php.ini file in your directory. If you don't see one, make one called php.ini and place it in the root folder. Add the following code to that file:


upload_max_filesize = 64Mpost_max_size = 64Mmax_execution_time = 300

This strategy has been reported to work for a large number of users. Remember, if 64MB doesn't work, try 10MB (sometimes that work).


3. htaccess MethodSome individuals have tried the.htaccess approach, in which you can increase the maximum upload size in WordPress by altering the.htaccess file in the root directory. Add the following code to the.htaccess file in the root folder of your WordPress site:


php_value upload_max_filesize 64Mphp_value post_max_size 64Mphp_value max_execution_time 300php_value max_input_time 300


It is critical to note that if you are using a shared hosting package, these strategies may not work. In such situation, you'd need to contact your web hosting provider and ask them to extend the quota for you.