Increase upload size in WordPress

While setting up an e-commerce part of a multi site WordPress installation, I stumbled upon a “glitch” that took a rather long time to figure out and I want to pass on this information so that others do not lose valuable time.  This “glitch” was nothing that was crippling for the entire operation rather just a very puzzling and frustrating experience.  Upload file size was set to 1MB.

Background:

I had installed the plugin WooCommerce to handle the e-commerce portion of a website. While putting the plugin through a few tests, prior to granting access to the clients administrators, I found that WordPress would not allow for any files larger than 1MB.  throwing this error:

 … exceeds the maximum upload size for this site.

This could turn out to be a bummer for me in terms of maintenance. Knowing that my clients files are routinely over 1MB, without larger file uploads my immediate thought was –

I would have to either teach the clients how to use FTP. Or the more likely scenario, I would have to manually upload the files for the client. Either way this could end up bad.

Not knowing what to do I turned to my trusted friend GOOGLE .  In a few short minutes I had determined I had three options.

  1. Add a function to the theme’s function.php file
  2. Add or Alter and existing php.ini file
  3. Add or Alter the .htaccess file.

The Options

Add a function to the theme’s function.php file

In my opinion this option should never be used. I required a solution that was not dependent upon the theme.  So I didn’t even try this solution.

Add or Alter an existing php.ini file

This option involved either altering an existing php.ini file found in the root of your install or creating a php.ini file if one did not previously exist.  Within this file the following lines of code would be added:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

I tried this option but it did not work.   🙁

Add or Alter the .htaccess file

This option involved either altering an existing .htaccess file found in the root of your install or creating a .htaccess file if one did not previously exist.  Within this file the following lines of code would be added:

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

Again this did not work.  🙁

The Solution

After stepping back and looking at the entire picture I realized that I was thankful that neither of them worked.  Both of those solutions required extra knowledge.  I do not believe that WordPress had that in mind.  From my dealings with WordPress I have found that almost everything can be done from the admin control panel.  What was I missing? 

Here is what I found: Multi Site.  I was forgetting that this was a multi site WordPress installation.  So here is what you do:

Quick note on how to increase the upload file size on WordPress multi site installs.

1. Login to WordPress admin panel
2. At the top, hover over My Sites and then click Network Admin.
3. At the left, hover over Settings and then click Network Settings.
4. Scroll to the bottom of the page and change the Max upload file size to whatever you would like in KB.
5. Click Save Changes.

Screenshots:

WPMU-Before
Find this field.
WPMU-After
Change size to desired size in KB.
WPMU Upload feature image
How to increase file upload size on WordPress Multi Site installations. Before and After

Leave a Reply