How To Increase WordPress Upload Size

You attempt to upload, let’s say a photograph, to your WordPress website. Instead of seeing your carefully arranged high resolution photograph screaming ‘buy me’ on your website, you are greeted with: “file name exceeds the maximum upload size for this site.” You begin to breathe rapidly as panic sets in; despair overwhelms you. You forego the upload; all is lost.

Leveraging the use of product photography on the websites of small to medium-sized businesses plays a vital role in their survival. So all could certainly be lost if you did choose to abandon the upload. Luckily, you can try again using one of the four methods for increasing your WordPress upload size that you will learn today.

Great News! WordPress Increase Upload Size!

Knowing what your current upload limit is might be a good place to start. This information is found on the same page you upload your files: Dashboard >> Media >> Add New. Your maximum upload size should be the last line of text.

Now what?

Now you need to know about the three server settings used to control your upload size. The three values are:

  1. a) Memory_limit:
  • How much memory is currently assigned to PHP
  • Should generally be largest of the three values, but can be equal to post_max_filesize
  1. b) Post_max_filesize:
  • The maximum size for each overall post (photographs, text… combined)
  • Has to be same or lesser than ‘upload_max_filesize’
  1. c) Upload_max_filesize:
  • Maximum size of any one file being uploaded
  • Set by your hosting provider
  • Usually between 2MB and 128 MB

Do I need to know what they are currently?

You do not need to know what their limits are to increase your maximum upload size. What really matters is that you have a fair grasp of your site’s needs.

1. You Guessed It, Plugins!

WordPress increases upload size using plugins. While there are a few such plugins, our example will be using Increase Maximum Upload File Size. It is currently the most popular with approximately 70,000 installations. Also, it automatically detects what your current post_max_filesize and upload_max_filesize are and explains your limits in easily understood language. However, you are free to use your plugin of choice.

To install this plugin:

  • From ‘Dashboard’, click ‘Plugins’.
  • Select ‘Add New’ from the drop-down menu.
  • Type in the name of the plugin and hit the ‘enter’ key.
  • From populated results, click ‘Install Now’ located beside the correct plugin.
  • Click ‘Activate’ when able to do so.

To use this plugin:

  • Under ‘Plugins’, click on ‘Settings’.
  • Select ‘Increase Maximum Upload File Size’.
  • At ‘Choose Maximum Upload File Size’, select a new upload size value.
  • Click ‘Save Changes’.

You are now able to upload larger files. But don’t start celebrating yet. A few things to note when using a plugin to increase your upload size:

  • The plugin is limited to current server settings, so you can only change post_max_filesize variable.
  • Because the plugin cannot override your web host provider (upload_max_filesize), there may still be some files you won’t be able to upload.

2. Themes Function

This method’s changes are somewhat superficial in that they are limited to the current theme. Should you change themes, the upload size values will revert to default. But since you did choose your website’s theme carefully, there is little chance of a change, right?

To try this method:

  • From cPanel ‘Dashboard’, go to ‘Appearance’.
  • Select ‘Editor’.
  • Click ‘Theme Functions/functions.php’ from the menu at right.
  • Add the following lines of code where ‘X’ represents the value’s size, and ‘M’ the unit of measurement (megabytes):

@ini_set( ‘upload_max_size’ , ‘xxM’ );
@ini_set( ‘post_max_size’ , ‘xxM’ );
@ini_set( ‘memory_limit’ , ‘xxM’ );

  • Click ‘Save Changes’.

The remaining methods put you in direct contact with your server’s settings. Given this, backing up your site before attempting to change server settings may be a good idea.

3. php.ini file

This method allows you greater access to all the values involved in determining your maximum upload sizes.

Option 1

  • Log in to cPanel.
  • Click on ‘File Manager’ located under the ‘Files’ heading.
  • Open your ‘public_html’ folder.
  • Open the ‘php.ini’ file.
  • You are now able to adjust the values upwards, but bear in mind the rules shared earlier about the relationships between the values.
  • Click ‘Save Changes’.

The php.ini file is a super important. Among variables, it controls your upload size limits. There may not be one present or visible, so you will need to create such a file. If you need to create one, copy the below:

upload_max_filesize = xxM

post_max_size = xxM

memory_limit = xxM

Option 2

If you have MultiPHP INI Editor, you may also adjust your php.ini files:

  • After logging into cPanel, find ‘MultiPHP INI Editor’ located under the ‘Software’ tab.
  • Under ‘Configure PHP INI basic settings’, access your domain root/home directory.
  • Search for each value and change the size according to your personal needs.
  • Click ‘Apply’.

4. .htaccess

This method is pretty much the same as the previous except you will be accessing a different file within which the changes will be made. Just like php.ini files, .htaccess files (the final method we are exploring to increase your WordPress upload size) can be absent or hidden.

  1. Log in to cPanel.
  2. Under the ‘Files’ heading, click on ‘File Manager’.
  3. Open your root directory.
  4. Highlight the ‘.htaccess’ file and click ‘Edit’ twice.
    • Once to call up the edit dialogue box, and the second to open the text editor.
  5. Edit the values present to reflect your site’s demands while keeping in mind the rules governing these integers.
  6. Click ‘Save Changes’.

What if I have to create the file?

The possibility exists that the file has been created but is hidden. Hidden files can be revealed through: cPanel >> Files >> File Manager >> Settings >> Show Hidden Files >> Save

If not, create the file and input the syntax below:

php_value upload_max_filesize = xxM
php_value post_max_size = xxM
php_value memory_limit = xxM

How will I know if I am successful?

If your changes are unsuccessful, you will be greeted with an ‘Internal Error Server’ message.

Conclusion

From choosing a theme to posting high quality media files, small to medium-sized enterprises rely heavily on their websites. Choosing a reliable and helpful WordPress website host provider will not only guarantee success, but also give you access to a fifth method to increase WordPress upload file size, that is, online support.

Overall, particular methods may appeal to different people. For example, plugins are ideal for persons unwilling (or unable) to adjust their server’s settings. On the other hand, some methods do not allow for advanced access to all variables. Regardless, you may need to try multiple methods until successful. Server settings vary so there are no guarantees that any one method will definitely let you increase your WordPress upload size.