– A Global Marketing Group Company

Have you tried to upload a file and received the unfortunate: “Exceeds the maximum upload size for this site” message. Many servers provide a file size limit of 2-5 MB which in most cases is not large enough for audio files to be uploaded. This article others multiple strategies to help you increase the file upload limit of your WordPress site.


This tutorial may not work successfully for shared hosting. If you can not expand the upload file size the best solution is to contact your hosting provider for further support. 

Always create a back up of your site when making changes.


What is the File Upload Limit of My WordPress Site?

To check the upload limit of your site you can complete the following:

  1. Click on ‘Media‘ and then on ‘Add New‘.
  2. Under the ‘Select Files‘ button, the maximum upload size for your site is listed (see image below).


How Can I Upload Media Files to My WordPress

Many people upload media files to their WordPress site using the simple drop or select files option under the ‘Upload New Media’ section. We have a tutorial on WP media uploader. Although this method is easy, it is good to understand that there are in fact many different ways of uploading media to your WordPress site.

  1. Uploading media by accessing the online file manager through your hosting provider
  2. Connecting to your server via FTP (for example by using FileZilla)
  3. Directly upload your files from the WordPress Dashboard (a popular method of uploading files)

Method 1) Increasing File Upload Limit by Adding Code to the Themes Function

For some sites, this simple method will work. This method involves adding three lines of code to the functions.php file.

Step 1) Click on the ‘Editor‘ under the ‘Appearance‘ menu.

Step 2) From the list of ‘Theme Files‘, choose ‘Theme Functions‘ (functions.php).

Step 3) Add the following code to your functions.php content:


Method 2) Adding Code to the PHP.Ini File to Increase Upload Size

This method involves accessing your WordPress site’s root folder through the use of FTP. Once you are in your sites directory on your hosting accounts cPanel dashboard, you may or may not see a file titled: ‘php.ini’. If this file does not exist you will need to create it. Simply create a file titled ‘php.ini’ and upload it into the root folder. In your ‘php.ini’ file, add the following code:


If this particular code does not appear to be working, try changing the maximum upload size. You can adjust the code according to the maximum files size you wish to upload. Below is alternative coding for those who want a maximum file upload limit of 20MB:


Method 3) Modifying the .htaccess File to Increase Upload Size

This method involves modifying the .htaccess file in the root directory to achieve an increased file upload limit.

To complete this method you will need to add the following code into your site’s ‘.htaccess file‘ towards the bottom beneath the words ‘End WordPress’:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Method 4) Using a Plugin to Increase Maximum Upload Size

For those who are not familiar with adding code to your WordPress site, there is a simple way to increase the file size. Using a plugin to increase file size is not the best way although works well for inexperienced WordPress users.

There are multiple plugins available to handle increasing maximum upload file size. It is entirely up to you which one you choose although the ‘Increase Max Upload Filesize‘ plugin is a popular free choice amongst WP users.

  1. Click on the ‘Plugins’ menu and ‘Add New’.
  2. Search for Increase Max Upload Filesize and install a plugin of your choice.
  3. Once the plugin is activated it will increase the maximum file upload size of your WordPress site.

Using the plugin mentioned above I was able to increase the maximum upload size of my WordPress account to 250MB (shown below).


Method 5) Contacting Your Hosting Provider

If none of the options above work for you then you will need to contact your hosting provider. Most hosting providers will up the file upload limit size for you, however you have to contact them directly to do this. For shared hosting they may not be able to make this modification to your server and they may request you go on to a hosting plan that will better fit your needs.

Hopefully this tutorial has helped you to increase the file upload size of your WordPress Site. We’d love to hear below which method worked for you!

Original Source