What's WP
Find Everything Related to WordPress - Best Tutoriasl on WordPress!
How to Increase WordPress File Upload Limit

How to Increase WordPress File Upload Limit

WordPress Media is a great function for uploading various files, including images, videos and audios. However, WordPress has set a serious limit for file upload. That is to say, if you upload files that exceed the specified limit, then you cannot put the file on your website successfully. Thus, for the webmasters developing a website that includes a large number of files to be uploaded, increasing WordPress file upload becomes an effective way to change the situation.

What’s so great about WordPress is that this powerful platform enables limitless possibilities for website customization. In the following guide, we are going to talk about how to increase WordPress file upload limit with three methods, including .htaccess, Theme Functions file and PHP.ini file.

Check Your File Upload Limit

Note that, if you want to check the file upload limit on your website, you are required to go to WordPress Dashboard > Media > Add New as what we’ve shown you in the following screenshot. The limit is shown below the upload box. Here, the maximum upload file size is 8 MB.

check file upload limit

Method 1: Modify .htaccess

The first way to increase file upload limit is to modify .htaccess file. This file is included in the website root folder. Because we have installed WordPress via cPanel, we are going to complete the following steps through this powerful control panel. Log into cPanel and go to Files > File Manager. And then, open .htaccess file in a text editor.

modify htaccess file

Once unfolding the file, you need to add the following code to the text. Certainly, you are allowed to modify the file size according to your own needs. Note that, if the hosting solution you have selected comes with limited resource allocation, you may be not able to take the code into effect. In this case, you can contact your hosting provider and ask if there is any other way to increase the file upload limit.

php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value max_execution_time 500
php_value max_input_time 500

After settling down all changes, you should save the file and then re-upload it to your website root folder.

Method 2: Modify Theme Functions File

The second way to achieve that goal is to add code to Theme Functions File. Go to your WordPress Dashboard > Appearance > Editor and open the file called Theme Functions (functions.php) included in the list on the right.

modify theme functions file

Add the following code to this file and then click Upload File button to confirm the settings.

@ini_set( ‘upload_max_size’ , ‘512M’ );
@ini_set( ‘post_max_size’, ‘512M’);
@ini_set( ‘max_execution_time’, ‘500’ );

Method 3: Modify PHP.ini File

Like the way to find out the .htaccess file, we would like to target PHP.ini file through cPanel. Log into cPanel and go to Files > File Manager. You are required to choose Home Directory under the Directory Selection pop-up. Once accessing to the next page, you need to find out the file called php.ini and then add the following code to this file.

upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 500

Increase File Upload Limit by Using WordPress Plugins

For the readers not familiar with code, we list some WordPress file upload plugins designed for increasing file upload limit, such as Increase Upload Max Filesize (https://wordpress.org/plugins/increase-upload-max-filesize/). This plugin is regarded as one of the best alternatives for the above-mentioned methods.

You just need to go to Dashboard > Plugins > Add New and install this plugin. After activating the Increase Upload Max Filesize, you are required to set up it and make full use of the various options.

wordpress file upload plugin


Lucy has been a very experienced SEOer, technical writer, web developer, c# developer since 2002. Now she owns a startup in San Francisco, CA, focusing on running a couple of blogs to share knowledge and experience with global readers and deliver exceptional results to global sponsors by leveraging the power of Internet.