Help! My file is too large to save in WordPress

I’ve seen this one many many times, and it’s very frustrating for users. All they want is their 5MB video file uploaded, but their server settings are limiting them to a limit of 2MB for file uploads. So what can be done?


Server Settings

Warning: Before you do this you’ll need to decide how large to make your allowed file upload size. Under most circumstances you’ll want to keep it as small as possible, mainly because

In a standard LAMP server, it is possible to change the server settings to allow you greater file upload sizes. If you’re running a dedicated server or a VPS and you have full access then you can update the main php.ini file. If you are on a shared server, you can create a local php.ini file for these settings in the root public folder for your site.

The settings that you’ll want to set are:

memory_limit = 64M
post_max_size = 10M
upload_max_filesize = 10M

Of course, you’ll change the values to match whatever you need your file upload limit to be.

Using FTP Uploads

If you can’t change your server settings (some shared hosts don’t allow this) or you won’t be doing this enough to warrant messing around in the config files, then you can use FTP in combination with the standard WordPress file uploading mechanism to get your file up there.

Note: This method won’t work for images because it doesn’t allow the WordPress system to create the required thumbnails for image files. You shouldn’t be uploading large image files to your server anyway as there’s a chance that you’ll hit resource limits generating the thumbnail images. If you want to do images you can create the thumbnails yourself, but I’ll leave that up to readers to figure out.

The process is a little involved, but it does work!

  1. Create a new text file on your local computer and add in a small amount of content (WordPress won’t upload a file that’s empty).
  2. Save the file with the same file name (including the extension) as the file that you want to upload.
  3. Upload the small text file using the WordPress media manager.
  4. Find the location by looking at the ‘File URL’ input box. You’ll see it as something like
  5. Use your FTP client of choice to connect to your sites FTP server.
  6. Navigate to the folder /wp-content/uploads/2013/05/ (use the folder from the example in step 4).
  7. Upload your original large file to this folder, over-writing the small file that was uploaded.

That’s all there is too it. Not that hard, right?

Now you can upload files as big as you need, with no more need to worry about the pesky server upload limits.

Leave a Reply

Your email address will not be published. Required fields are marked *