How to Increase Media Maximum File Upload Size in WordPress

Getting your Trinity Audio player ready...

Having a low maximum file upload size limit in WordPress can be extremely frustrating, as it prevents you from uploading larger media files and installing larger plugins and themes. If you’re running into this problem, you probably want to increase the maximum file upload size in WordPress as soon as possible. Fortunately, there are several ways to do this without having to access any server files or settings.

In this article, we will explore seven effective methods to increase the maximum upload size for media files in WordPress, allowing you to handle large images or videos on your website seamlessly.

What Is the Maximum Upload Size for WordPress?

The maximum file upload size for images in WordPress is determined by the hosting service and varies accordingly. The maximum upload size in WordPress typically ranges from 2MB to 150MB, depending on your web hosting settings.

The limit is established by the hosting provider at the server level in order to avoid timeouts. The default upload file size on Cloudways is 10MB. Increasing the file upload size allocation on your website is a feasible solution if it falls short of your requirements.

In the process of website building, it is common to require the uploading of media files such as images, videos, themes, and plugins. Sometimes these files are larger than the maximum upload size set in WordPress.

Why Increase the Maximum File Upload Size in WordPress?

Increasing the maximum file upload size in WordPress is an important action to take, especially if you are dealing with hefty files that are larger than usual. It can be especially needed when a website has large amounts of media or content like podcasts or videos, which require much bigger data sizes.

In some cases, the default upload limit might be too little and might cause some inconveniences for a website administrator. Therefore, it is highly recommended to increase this setting if your website deals with more intensive types of media on a regular basis.

However, if you need to upload files larger than this limit, then it’s important to increase the maximum file upload size in WordPress. For example, if you run a photography website and need to upload large images or videos, then increasing the upload limit can help prevent any errors caused by too large of file size.

Increasing the limit also allows you to take full advantage of all of your content management capabilities within WordPress. This makes managing your content much easier and gives you greater flexibility regarding what type of files you can add to your site.

Say, for instance, the size of a new theme file exceeds the default limit, uploading it to the site will result in failure. If the PHP variable is set to a low value on your site, the upload will produce the error mentioned earlier. To resolve the problem, it would be necessary to adjust the maximum upload size in WordPress.

How to Check the Current Maximum Upload Size in WordPress?

WordPress is a powerful and secure platform for managing your website, so it’s important to know what the maximum file upload size limit is to ensure that you’re not uploading large files which could slow down your website. 

To check the current maximum upload size limit of your WordPress site, follow these steps:

  1. Log in to your WordPress admin panel.
  2. Navigate to WP Admin → Media → Add New.
  3. You will find the current maximum upload size displayed at the bottom of the page.
Checking the maximum upload file size

Knowing how to effectively check the maximum file upload size limit should help you determine if you need to increase or decrease this number depending on what type of content you plan on uploading onto your site.

Different types of content usually require different sizes. For example, uploading lots of images may require a larger file size than audio or other types of content. By familiarizing yourself with this setting, you can configure your WordPress site settings so it best meets the needs of all its users and visitors.

How to Increase File Maximum Upload Size in WordPress?

By default, WordPress sets an upper limit on the maximum upload size for media files, which can be too small for some types of content. Fortunately, it's fairly easy to increase the maximum upload size so you can start sharing larger media files with your audience.

These are the best methods for increasing WordPress’s maximum upload size of media files.

  1. Updating the .htaccess file.
  2. Editing the functions.php file.
  3. Modify the php.ini file, or create a new file.
  4. Adjust the upload size for Multisite.
  5. Make changes to the wp-config.php file.
  6. Use the Plugin Method
  7. Contact Hosting Provider

Method 1: Updating the .htaccess File

edit .htaccess file

Image Source: Cloudways

If your web server uses Apache and PHP is set as an Apache module, you can increase the max upload size by adding the following lines of code to your WordPress .htaccess file. Here's how:

  1. Connect to your server using an FTP client like FileZilla.
  2. Locate the folder where WordPress is installed.
  3. Open the .htaccess file in a code editor or Notepad.
  4. Add the following lines of code to the file:
php_value upload_max_filesize 64M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

Save the changes and upload the modified .htaccess file back to the server.

Method 2: Editing the functions.php File

theme file editor increase maximum upload file size

Image Source: Cloudways

Another one of the simplest ways is by registering the theme’s functions.php with code that informs the server-side configuration of your hosting provider about the new file size limit. Adding a line of code to define the upload_max_filesize value will let you specify the maximum file upload size limit for all types of files, including images, videos, and audio files.

If you prefer to edit WordPress theme files instead of the .htaccess file, you can increase the size limits by adding the following lines of code to the functions.php file of your current theme:

  1. Go to your WordPress Dashboard → Appearance → Theme Editor.
  2. Select the Theme Functions (functions.php) file.
  3. Add the following lines of code at the end of the file:
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

Save the changes.

Method 3: Creating or Editing the php.ini File

The php.ini file is used to configure PHP applications and contains parameters for file timeout, upload size, and resource limits. Follow these steps to create or edit the php.ini file:

Access your WordPress root directory using SSH or FTP.

  1. Look for an existing php.ini file. If you can't find one, you can create a new file.
  2. Open a text editor and create a new file.
  3. Add the following code to the file:
  4. Save the file as php.ini.
  5. Upload the php.ini file to your WordPress root directory using SSH or FTP.
upload_max_filesize = 64M
post_max_size = 128M
memory_limit = 264M

Image Source: Cloudways

Save the changes.

Method 4: Increasing Upload Size in Multisite

If you are running a WordPress multisite installation, you can increase the upload size limit from the network settings. Follow these steps:

  1. Access your WordPress admin panel.
  2. Go to Network Admin → Settings → Network Settings.
  3. Look for the "Max upload file size" option.
  4. Increase the value to your desired limit.
  5. Save the changes.
maximum upload size adjustment

Image Source: Cloudways

Method 5: Modifying the wp-config.php File

Another method to increase the upload size in WordPress is by modifying the wp-config.php file. Here's how:

  1. Access your WordPress root directory using SSH or FTP.
  2. Locate the wp-config.php file.
  3. Open the file in a text editor.
modify wp-config file

Add the following code to the file, just before the line that says "That's all, stop editing! Happy blogging.":

@ini_set( 'upload_max_size' , '20M' );
@ini_set( 'post_max_size', '13M');
@ini_set( 'memory_limit', '15M' );

Method 6: Update Using a Plugin

If you prefer a user-friendly approach without dealing with code or file modifications, you can use a WordPress plugin to increase the maximum upload size. One such plugin is the "Increase Max Upload Filesize" plugin.

Here's how to use it:

  1. Go to your WordPress admin panel.
  2. Navigate to Plugins → Add New.
  3. Search for "Increase Max Upload Filesize" and install the plugin.
  4. Activate the plugin.
increase max upload size plugin

Image Source: Cloudways

Go to the plugin settings and enter the desired upload size value and save the changes.

add upload file size value

Image Source: Cloudways

Method 7: Contacting Your Hosting Provider

If you are not comfortable making changes to files or using plugins, or if the above methods don't work for you, you can always contact your hosting provider for assistance.

Most hosting providers have support teams that can help you increase the maximum upload size for your WordPress site.

Load WordPress Sites in as fast as 37ms!

Summary and Additional Tips

Increasing the maximum upload file size in WordPress is an easy task. All it requires is to know where and what commands or tools should be used for the purpose. If you're stuck with your hosting provider, try other methods such as increasing the size from php.ini or adjusting your .htaccess file if they don't seem to help. Before going for a different host, try these alternatives first as it might end up being unnecessary.

Apart from that, make sure to keep an eye on memory limit values while increasing file size limits as well; otherwise, you may face undelivered images or files due to exceeded memory limits.

Once all of this has been accomplished, get uploading! Whatever the project may be - building a heavy portfolio site or simply installing a large theme - there should be no issue with WordPress' maximum upload file size restriction henceforth.

Remember to always make backups of your files before making any modifications, and if you encounter any difficulties, don't hesitate to seek support from your hosting provider. Additionally, it's essential to optimize your media files for web usage to ensure faster site loading speeds.

author avatar
Nonofo Joel
Passionate blogger with expertise in Branding, Website Design, Content Marketing and SEO. Engaging content, unique perspective, and over a decade of experience. Join me on Global Tech Stack for captivating insights, reviews and inspiration.