File exceeds the maximum upload size for this site? Increase it!


You try to load an audio file to your WordPress website and ugggh, “… file exceeds the maximum upload size for this site.” Hmmm. Your host server has a php setting that is limiting file upload size, probably in an attempt to save space and bandwidth…. but your client wants an audio clip added to the home page… now.

There are instructional posts around the internet with solutions, but I have found that they can be confusing and sometimes leave out vital bits of information. I want to show you the SIMPLEST way to increase your maximum upload limit for your WordPress website. It’s true, this won’t work on every single server configuration, but I have found it to work about 90% of the time. I’ll go step by step… in detail.

Christy Eller

Edit the .htaccess file

Yes, this requires you to have ftp access… but the only method that does not is the functions.php method. That method implies you have a child theme. If you have a child theme, you probably have ftp access. But the main downside to the functions.php method is that I’ve never had it work… so forget it.

  1. Get ftp access… or use the file manager included in your hosting panel.
  2. Log into the site by ftp…. or by using the file manager from your host’s cPanel.
  3. If logging in by ftp, you will use an ftp client on your computer. Some good ones are Cyberduck  (my favorite) or Filezilla, both are free and quick downloads.
  4. Open a connection once inside the ftp client application. Fill in the necessary fields, which will look something like this:
    1. hostname: ftp.yoursite.com
    2. user: yourusername
    3. password: yourpassword
  5. If your creds are correct, you will soon be looking at your files on the server, yay!
  6. Once in by ftp, or by your host’s file manager app, make sure you are in the root folder for your WordPress install. You will be seeing files with names like wp-admin, wp-content, etc.
  7. Look for the file called .htaccess
  8. If you do not see it, it is probably “hidden.” You will need to go up to File/View Hidden Files if in by ftp client… or the equivalent action in your host’s file manager. Check that option and you will be able to see it.
  9. Click it to open it…. or click “Edit File” in your file manager.
  10. The file should open in a text editor… like Notepad or gedit, etc.
  11. Save a version of it with another name onto your local computer… in case you mess up and need to revert to it. Maybe call it .htaccess_copy.
  12. You are going to add the lines of code below to tell the server to allow larger file uploads. Copy them to your clipboard (fancy name for your computer’s temporary storage)
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
  1. Where do you add them? This is the step that most of the tutorials neglect to mention. Put them directly BEFORE the line that reads: </IfModule>    You may have a very simple .htaccess file, or you may have a very confusing-looking one with lots of lines… usually added by a caching plugin like WP Supercache. Just look for the “</IfModule>” line, and add the lines right before this.
  2. Save the file. It will automatically upload over the old one on the server. Be careful.
  3. Go refresh the page on your website where you were trying to upload the large file.
  4. Hopefully, your limit will have been raised and you will be golden.
  5. Congratulate yourself on being a WordPress expert.

If you mess up…

Yes, it’s possible you could take down the site… but that’s okay. You have a copy, remember? Don’t panic.

  1. Go back to the local copy you saved and named .htaccess_copy
  2. Copy it and paste it to the server.
  3. Rename the one currently called .htaccess on the server to .htaccess_hold
  4. Then rename that one you named .htaccess_copy to .htaccess. It will take over for you.
  5. Start the process again, and don’t mess up this time :)
  6. If you were extra naughty and did not save a local copy, you can find the basic version here. Copy this into the messed up one. That will work.

I hope this helps.

If not, here’s some more solutions…. or just call your host.