2015-01-14

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.



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.



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.

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.



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

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.

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.

The post How to Increase WordPress File Upload Limit appeared first on WPMatter - WordPress Coding, Web Hosting, Theme, Plugin and SEO Matters.

Show more