How to Increase the Maximum File Upload Size in WordPress: The Complete Guide

If you‘ve ever encountered file upload errors in WordPress, you‘re not alone. Many site owners run into this frustrating issue when trying to upload large images, videos, PDFs, and other media.

The good news is that adjusting the max file upload size limit is a common task that we can walk through together in this guide.

After 15+ years of managing WordPress sites, I‘ve helped hundreds of users troubleshoot and resolve file size limit problems. In this post, we‘ll explore the most effective ways to increase your max upload size in WordPress.

Let‘s start with a quick overview of why you might need to raise the file size limit, and how to find your current limit.

Why You Might Need to Increase the Max Upload Size

There are a few common reasons you may need to upload larger files than the default limit:

  • High-resolution images – For photography sites, portfolios, and more, you need to upload very large image files. The average image weight is now around 2MB per image, with many above 5MB.

  • HD video files – If you want to host videos directly in WordPress, the video files are often over 50MB or more, sometimes exceeding 500MB.

  • Large PDFs and documents – PDF brochures, reports, and ebooks can easily be 20-50MB or higher. Trying to add these as attachments or portfolio pieces can hit the max limit.

  • Premium themes and plugins – Many advanced WordPress plugins and themes now exceed 10MB or even 50MB as file sizes continue to grow. Installing these requires raising the limit.

As you can see, it‘s very common to run into upload size restrictions today. Next let‘s go over how to find your current limit.

Checking Your Current Maximum Upload File Size

Finding your current max file size limit only takes a minute:

  1. In your WordPress dashboard, go to Media > Add New
  2. You‘ll see the Maximum upload file size listed right at the top

The default limit will vary by web host, but is often 50MB or less. Now let‘s look at the different ways to increase that number.

5 Ways to Increase the Maximum Upload File Size

1. Contact Your Web Host Support

The simplest option is to reach out to your WordPress host and request they increase the max file upload size. Most hosts like Bluehost have excellent customer support and are happy to make this quick change.

They will modify the upload_max_filesize and other PHP directives on your server. It‘s a simple task that takes just a minute or two in most cases.

I recommend this method for beginners who don‘t want to manually edit PHP and server config files themselves.

2. Manually Edit the php.ini File

More experienced users can directly edit the php.ini file to raise the limit. This houses the core PHP settings and configurations.

If your host uses cPanel, you can navigate to MultiPHP INI Editor and edit the values there:

  • upload_max_filesize
  • post_max_size
  • max_execution_time

Without cPanel, you‘ll need to use FTP or ask your host to add these lines to php.ini:

upload_max_filesize = 128M
post_max_size = 128M 
max_execution_time = 300

And change 128M to your desired max file size.

3. Add Code to functions.php

Using a plugin like WPCode, you can add the following to your active theme‘s functions.php file:

@ini_set( ‘upload_max_size‘ , ‘128M‘ );
@ini_set( ‘post_max_size‘, ‘128M‘);  
@ini_set( ‘max_execution_time‘, ‘300‘ );

This will override the php.ini values at the theme level.

4. Modify the .htaccess File

If you have FTP access, you can edit the .htaccess file in WordPress root:

php_value upload_max_filesize 128M 
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300  

This achieves the same result as editing php.ini directly. Look for .htaccess in /public_html/ or /www/

5. Use a Plugin to Increase Upload Size

For beginners, a handy plugin like WP Increase Upload Filesize makes it easy. You can raise the limit right from your dashboard without touching any complex code.

Once activated, go to Settings > Increase Upload Limit and adjust the value. Then click Save Changes.

This plugin works great but may be limited by what your host allows. Check with them if you need uploads beyond 256MB.

Additional Tips for Managing Large Files

Aside from directly increasing the file size limit, there are a few other tips I recommend:

  • Optimize your images – Use tools like Smush and Shortpixel to reduce image file sizes without losing quality. This allows you to upload even more within the max limit.

  • Convert videos to smaller files – Program like Handbrake make it easy to compress and optimize video for the web without impacting quality.

  • Host media on a cloud service – Rather than uploading to WordPress, use a cloud storage service like Amazon S3 to host large media files. This also improves site load times.

  • Be selective about file types – Avoid massive uncompressed files types like TIFF images which are known for huge file sizes. Pick more optimized formats like JPEG and PNG.

  • Consider a CDN – A content delivery network like Cloudflare can cache and serve your large files faster. This takes the burden off your server.

Troubleshooting File Upload Issues in WordPress

Increasing the max upload size is the most common solution for file errors, but here are a few other things to check:

  • Double check that your files are under the set limit after optimization. Some image and video editors don‘t compress enough.

  • Clear your browser cookies and cache if you run into inconsistencies or temporary issues uploading.

  • Make sure your internet connection is stable. Large uploads require a strong and consistent connection.

  • There could be a plugin conflict if you only have issues with a particular file type like PDFs. Check by disabling other plugins.

  • Your web host may have temporary server maintenance or downtime that‘s impacting uploading. Check their system status page.

  • On rare occasions, there may be a problem with file permissions on the server for the /uploads/ folder. Your host can check this.

  • You‘ll want to rule out any problems with WordPress file permissions if you recently migrated to a new host or server.

Adjusting the max file size limit fixes most cases. But now you have a handy troubleshooting guide for those stubborn file upload problems too!

Summary

I hope this detailed guide helps you resolve any file size limit issues and upload larger images, documents, and media to your WordPress site.

Don‘t hesitate to reach out if you run into any hiccups! With over 15 years of experience fixing WordPress upload problems, I‘m always happy to help troubleshoot.

Let us know if you have any other questions!

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.