upload images to WordPress

How to Increase Max Upload Size in WordPress

Uploading files to your WordPress website may seem like an innocuous process, but if you’re building a site with a lot of large media files (like images, videos, or large plugins and themes), making sure they load correctly can be more complicated than you might think.

Media-heavy websites, like photography sites and design portfolios as well as eCommerce stores, often require large image files (or larger plugin and theme files) to sufficiently meet the demands of their audiences. 

However, if the maximum upload size that’s set for those sites is too low, it will prompt an upload error (and the file in question will not be successfully uploaded).

Files that exceed a site’s maximum upload size will prompt an error message.  

If you’re building a site that includes (or will include) a lot of large media files, you may want to consider increasing the maximum upload size for your site. This will ensure larger files display correctly without encountering upload errors. 

Read on for quick answers to common questions about increasing the maximum file upload size on your WordPress site, including:

  • Why Should You Increase Your Max Upload Size in WordPress?
  • What Is the Maximum Upload Size for WordPress?
  • What Are the Steps to Increase Your Max Upload Size?

Why Increase Max Upload Size in WordPress?

There are a few reasons you may need to increase the max file size for media uploaded to your website. First and most obviously, large files for high-resolution images, custom themes, important plugins, and video files will often necessitate the ability to upload large files.

Note: WP Engine does not recommend hosting videos directly from your WordPress site. Instead, we provide customers with a CDN that offloads large video files to keep sites running lighting fast.

As mentioned, eCommerce sites also often require an increased max upload size to sell products more effectively, and this is true whether the products are physical or digital. 

To effectively sell physical products, retailers see more success when listings and product descriptions are accompanied by multiple high-quality images.

If you sell digital products, like ebooks or online courses, increasing the upload size on your WordPress site creates the opportunity to house all your important content under one digital roof.

Increasing your max file size on WordPress also allows you to refresh your site’s content more frequently. Because fresh content will help drive more traffic to your site, a larger max file size can also be highly beneficial for marketers and site owners who want to rake in a larger audience.

What is the Maximum Upload Size for WordPress?

The maximum file upload size for WordPress can fall anywhere between 2 MB and 500 MB, depending on your specific website hosting provider. 

The hosting provider you choose will determine the maximum upload size for your site. For example, at WP Engine, the default maximum upload file size is 50 MB (or 1 MB for multisite networks). 

How to Check Your Maximum Upload Size

You can check what your site is currently registering for the max file upload size from the /wp-admin/upload.php page:

drop files anywhere to upload in WordPress

Because your hosting provider sets your site’s upload size, contacting them directly will likely be the best way to determine the maximum upload size they make available. 

WP Engine customers can increase their site’s max file upload size (up to a maximum of 256 MB) by contacting Support. Any files larger than 256 MB must be uploaded via SFTP or SSH Gateway.

Steps to Increase Upload Size in WordPress

While your hosting provider will determine the maximum upload size of your site(s), there are a few ways you can try to increase it. The following are a few of the most common tactics for increasing the max upload size on your WordPress site.

Contact hosting provider

As noted above, the easiest way to increase the upload size for your WordPress site(s) is to contact your hosting provider. Going this route is often ideal for beginners or other less-technical users because your provider’s customer support team should be able to advise you on the best options for your site and increase your max upload size if you decide to do so.  

Update .htaccess file

If you’re confident in your coding skills, you can also increase your max upload size by updating your site’s .htaccess file. 

This will require a relatively simple modification to the .htaccess file, which controls the high-level configuration settings for your site.

To get started, you’ll need to connect to your web server (using an FTP client or cPanel file manager) and locate the .htaccess file, which is usually in the root directory of your WordPress install. If you don’t see the file, make sure that hidden files are being shown in your FTP client or file manager. 

Download a copy of the .htaccess file to your computer as a backup and then open the file using a text editor (like Notepad or TextEdit). In the text editor, add the following lines at the bottom of the file: 

php_value upload_max_filesize 256M

php_value post_max_size 256M

php_value max_execution_time 300

php_value max_input_time 300

(You’ll notice that this file measures size in M instead of MB because this is how PHP handles all directives.)

Once completed, save the file and upload it back to your web server, overwriting the original .htaccess file.

In the event that you receive an error message, it will likely be a 500 Internal Server Error. If this occurs, it means that, due to your server settings, you are unable to change your max upload size using the .htaccess file.

In all cases, we recommend making modifications to your website in a staging or development environment rather than in live production.

Edit functions.php file

Another way to increase your max upload size yourself is to edit the functions.php file of your site’s theme. 

Similar to editing the .htaccess file, you’ll need to locate the functions.php file (likely in your root directory) and download a backup copy.

Then, open the file using a text editor and add the following code snippet at the bottom:

@ini_set( ‘upload_max_size’ , ‘256M’ );

@ini_set( ‘post_max_size’, ‘256M’);

@ini_set( ‘max_execution_time’, ‘300’ );

Just like the .htaccess file method, you’ll save this once complete, upload it to your web server, and overwrite the original functions.php file.  

Steps for Multisite

If you’re running a WordPress Multisite network, you can increase your max upload size across the entire network. 

To get started, head to your Network Admin dashboard, and underneath the Settings tab, click Network Settings. Scroll down the page until you see a field called Max Upload File Size.

Simply change the value currently in that field to a higher value and click Save Changes to increase your max upload size. 

Be aware that this will not circumvent your server’s max upload limit. If the value you entered exceeds the server’s limit, you’ll need to contact your hosting provider or try one of the other methods outlined above.

Website Hosting Made Easy with WP Engine

If you’re looking for a WordPress hosting provider that will ensure your website has the upload size you need, look no further than WP Engine

Our award-winning customer support team is available 24/7/365 to help you take care of all the upkeep and updates your site needs to succeed.

Talk with a specialist today to find the plan that’s right for your site, your goals, and your business!

Get started.

Build faster, protect your brand, and grow your business with a WordPress platform built to power remarkable online experiences.