A depression WordPress upload size limit stops you from uploading large files, plugins, and themes. If yous're building a media-heavy website, that can be a considerable obstacle. It's necessary to increase the max upload size in WordPress or your server (or both) in such cases.

Depending on your hosting provider and server, there are many ways to go about solving this issue. We'll encompass them all in this commodity and bear witness you lot how to increase the maximum upload size in WordPress quickly.

Allow's dive in!

Prefer to watch the video version?

What Is the Maximum Upload Size in WordPress?

Uploading big files to a server consumes a lot of the server'south resources. To prevent users from causing server timeouts, the default maximum upload size in WordPress typically ranges from iv MB to 128 MB. Unremarkably, the hosting provider sets this limit at the server level.

WordPress as well includes constants that define this limit, but they cannot override the server-level settings in well-nigh cases.

To verify this, go to your WordPress site's Media Library. Hither, try to upload a file that crosses this maximum upload file size limit. You'll see an mistake message that looks something like this:

Error while uploading a large file in WordPress
Error while uploading a large file in WordPress

The "exceeds the maximum upload size for this site" error tin can be frustrating, but it exists for two primary reasons: security and efficiency. Information technology hinders site owners and other users, including malicious actors, from uploading huge files (eastward.g. high-resolution images, large videos).

Otherwise, it can result in incapacitating your website's server, making your site come up to a crawl. Or worse, it can bring your site downward birthday!

Want to upload a big file, plugin, or theme... but limited past the max upload size?🗂 Learn how to resolve this common issue quickly & easily correct here ⬇️ Click to Tweet

How to Cheque the Current Maximum Upload Size in WordPress

There are many ways to bank check your WordPress site's current max upload size. Let's get through all of them.

In the Media Library

The quickest manner to check your site's current maximum upload size is to go to your WordPress dashboard, and from there, get to Media > Library. Hither, click on the Add New button to activate the media uploader tool.

The "Maximum upload size limit" in WordPress
The "Maximum upload size limit" in WordPress

As Kinsta hosts this site, the Maximum upload file size: 128 MB. message displays beneath the Select Files push. If you're using a different web hosting provider, you may see a different limit listed here.

You can also go to Media > Add New directly and see the aforementioned message displayed at the bottom.

The
The "Maximum upload file size" in WordPress' Media Library

Once again, you tin see the 128 MB max upload file size here.

In the Site Health Info

WordPress v.2 added the Site Health Info tool to help you debug your WordPress site better. Here, you can discover almost all the data about your server and WordPress configuration.

As both the server and WordPress handle the max upload file size, in that location are two ways to find its value on this screen.

First, you can find it listed under the Media Handling dropdown. Hither, look for the value of Max size of an uploaded file constant.

'Media Handling' settings in the 'Site Health Info' panel
'Media Handling' settings in the 'Site Wellness Info' panel

The second method is to expect nether the Server dropdown. Y'all'll find many options related to your webserver'due south setup nether here. Please search for the value for Upload max filesize abiding to run into what it is. On this site, the max upload file size limit is 128 MB.

'Server' settings in the 'Site Health Info' panel
'Server' settings in the 'Site Health Info' panel

Y'all can as well see other PHP constants and their values, such equally:

  • PHP post max size: Defines the maximum upload limit for Postal service requests.
  • PHP retentivity limit: Defines the memory allocated for PHP. It should exist set equal to or higher than the Upload max filesize limit. Or else the upload will fail.

Your web host sets these options. Usually, starter hosting plans will have a lesser upload size limit than enterprise hosting plans. Some hosts may allow y'all to override these limits. Merely in near cases, yous may demand your hosting provider'south assist (and perhaps a plan upgrade) to increase them.

Why Increment the Maximum Upload File Size in WordPress?

There are many reasons why you may need to increment your WordPress site'southward maximum upload file size. Here are the most common ones:

  • You want to install a big theme or plugin directly through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a great fashion to keep your readers engaged and return for more. And that includes uploading new images, videos, audios, and other media regularly. However, that's not always feasible when in that location's a file size limit for your uploads.
  • You want to upload a large video or image as your site'southward background or header.
  • You plan to sell digital files such as ebooks, photographs, videos, themes, and plugins direct from your site. Sometimes, these files can run up to hundreds of megabytes (or more than).

Now that we've covered the basics of max upload file size in WordPress, let'south learn how to increase information technology.

ten Ways to Increment the Max Upload File Size in WordPress

There are many ways yous tin prepare the WordPress maximum upload size issue. We'll showtime with the easiest ones kickoff, and then we'll move on to the intermediate-level tutorials.

Contact Your Hosting Provider for Help

If you lot're facing issues with uploading files and file size limits, reaching out to your hosting provider for aid is one of the quickest solutions. Increasing the upload limit is a lilliputian chore for tech support, so nigh hosting companies tin assistance you gear up this issue apace.

Tinkering with your server or site configuration files tin can always exist a challenge. Hence, we always recommend you lot try this method outset.

If you're hosting your site with Kinsta, our knowledgeable support team is merely a click abroad and available 24/seven. To get started, go to your MyKinsta dashboard and click the chat icon in the bottom right corner.

Contact Kinsta support easily through MyKinsta
Contact Kinsta support easily through MyKinsta

We take representatives to assist you in many languages, including English language, Spanish, French, German, Italian, and Portuguese.

Increase the Max Upload File Size in WordPress Multisite

If you're running a WordPress Multisite network, then you can modify the max upload file size for your network.

Outset, caput to your Network Admin dashboard, and so go to Settings > Network Settings screen. Hither, whorl downwardly till yous find the Upload Settings section. Y'all'll detect the Max upload file size field in this area.

The 'Max upload file size' in 'Network Settings'
The 'Max upload file size' field in 'Network Settings'

The default value of Max upload file size in a WordPress Multisite is 1500 KB (~1.5 MB). Yous can alter this to a higher value and click the Relieve Changes button.

Notation: Yous cannot circumvent the server-level max upload size limit from here. If the limit you set here is higher than the server's max upload size limit, the server will ignore information technology. You can apply the methods described higher up to find your webserver's configuration.

The new 'Max upload file size' field in 'Network Settings'
The new 'Max upload file size' in 'Network Settings'

Here, we've set the new max upload file size to 131072 KB (~128 MB).

You can also limit the total size of files uploaded to an individual site in the Multisite network. However, it's disabled by default.

Update Your '.htaccess' File

If your webserver runs on Apache, y'all can update your site's .htaccess file to increase the max upload size in WordPress. You lot tin find your .htaccess file in the WordPress site's root directory.

Every bit per PHP documentation, three PHP directives are responsible for how WordPress handles uploads. They are:

  • upload_max_filesize
  • post_max_size
  • memory_limit

We've already discussed them in the Site Health Info section in a higher place. Information technology would aid if you modified these three directives' values to acknowledge your file sizes. For instance, if the largest file you're planning to upload is 32 MB, we recommend the following settings:

  • upload_max_filesize = 32M
  • post_max_size = 64M
  • memory_limit = 128M

Notice, all the values use M instead of MB. That's how PHP handles its directives.

Uploads tin can incorporate actress information in add-on to the file itself. So, giving all other upload-related directives some breathing space is a good thought. You can read our in-depth tutorial on how to meliorate PHP memory limit in WordPress for more information.

Access your .htaccess file via FTP/SFTP or your hosting provider'southward File Manager.

Finding the '.htaccess' file
Finding the '.htaccess' file

Open the.htaccess file with a text editor or code editor, and so add the following code:

          php_value upload_max_filesize 32M php_value post_max_size 64M php_value memory_limit 128M php_value max_execution_time 300 php_value max_input_time 300        

You can notice two other PHP directives in the above code: max_execution_time and max_input_time . They define how long a server spends on a single PHP task. The bigger your uploads, the bigger the time spent will exist. You need to fix their values to a number that'due south appropriate for your use case.

Note: You may get a 500 Internal Server Fault after using the method above. About likely, it'southward because your server is running PHP in CGI mode. In such cases, you cannot use the in a higher place commands in your .htaccess file.

Create or Modify the 'php.ini' File

The php.ini file is where you ascertain changes to your default PHP settings. Typically, it contains directives that define file timeouts, max upload size, and resource limits.

Using SSH or FTP, you tin can find the php.ini file in your WordPress root directory. In some cases, you may not locate it in that location. Fret non! Yous can create a new file with the same name in your site's root directory.

How to create a new php.ini file
How to create a new php.ini file

With a lawmaking or text editor, add the following code to your existing or new php.ini file:

          upload_max_filesize = 32M post_max_size = 64M memory_limit = 128M        

Don't forget to save your file later making the changes. Some hosts don't permit you to modify PHP settings via this method. In such a case, you can proceed to endeavour the following solution instead.

Subscribe At present

Create or Modify the '.user.ini' File

If your hosting provider has locked downwards the global PHP settings, they may have configured the server to piece of work with .user.ini files instead of php.ini files.

Similar php.ini and .htaccess files, you can find the .user.ini in your site'southward root directory. If yous can't find information technology, so you tin can create a new .user.ini file in the same location. Follow the same procedure described in the previous method to create a newphp.ini file.

Next, add the following lawmaking to your .user.ini file:

          upload_max_filesize = 32M post_max_size = 64M memory_limit = 128M        

You'll discover that it's a repeat of the previous method, except with a unlike filename.

Change PHP Options via cPanel

If your hosting provider uses the cPanel dashboard to help yous manage your server and site configuration, you can modify the max upload file size through its interface.

To get started, go to your cPanel dashboard, and select the Select PHP Version nether the Software department.

Click 'Select PHP Version' in cPanel dashboard
Click 'Select PHP Version' in the cPanel dashboard

Here, y'all tin can change your server's current PHP version and enable/disable many PHP extensions. Click on the Options link in the navigation carte to go to the PHP Options console.

Go to the 'PHP Options' settings in cPanel
Go to the 'PHP Options' settings in cPanel

Scroll down here to modify the values of PHP directives such equally upload_max_filesize , post_max_size , memory_limit , max_execution_time , and max_input_time . The max values you can ready here depend on your current hosting plan.

The 'PHP Options' screen in cPanel
The 'PHP Options' screen in cPanel

If you take any doubts nigh these values, we suggest yous contact your hosting provider. The latest cPanel dashboard saves changes automatically, so you don't have to click anything. But if you're using an older cPanel version, brand sure to click the Salvage Changes button.

Increase the Max Upload File Size in Nginx

Nginx is another webserver like Apache, simply it's also a lot more. Typically, Nginx can handle more concurrent requests than Apache, making information technology a lot faster. Kinsta uses Nginx to power its functioning-optimized hosting solutions for WordPress.

If you're running your WordPress site on Nginx, you lot'll need to modify both your php.ini and nginx.conf files. We've dealt with the quondam file before. The latter one is called an Nginx config file.

On an Nginx server, you tin discover the php.ini file at /etc/php/vii.4/fpm/php.ini . Depending on which PHP version you've installed, the exact path may vary slightly.

          upload_max_filesize = 64M post_max_size = 128M        

You lot don't take to set the memory_limit in the higher up file as Nginx handles it differently. For more than, you can check out this Stack Overflow thread. Afterwards saving your php.ini file, enable the changes past restarting PHP-FPM using the beneath code in your concluding:

          sudo service php7.four-fpm restart        

Over again, the exact lawmaking may vary slightly depending on the PHP version installed on your server.

Next, utilise Nginx'due south client_max_body_size directive to gear up the new max upload size limit. Y'all need to declare this directive in the nginx.conf file, which you tin can discover at /etc/nginx/nginx.conf .

You can declare this directive inside the http {...} block, the server {...} block, or the location {...} block.

Setting it in the http block will affect all the sites/apps hosted on this server.

          http {     ...     client_max_body_size 128M; }        

Defining it in the server block will merely impact a specific site/app hosted by this server.

          server {     ...     client_max_body_size 128M; }        

The location block only affects the specified directory (due east.grand. files, uploads) inside a site/app.

          location /files {     ...     client_max_body_size 128M; }        

Don't forget to save the file and restart Nginx to apply the changes. To practice that, you tin can apply the post-obit command in your terminal:

          sudo service nginx reload        

If you're a Kinsta customer, you can't admission your Nginx config directly. Even so, yous can reach out to our support squad, and they can speedily make the changes for yous.

Use the WordPress 'upload_size_limit' Filter

WordPress 2.5 introduced the upload_size_limit filter, which filters the maximum upload size allowed in php.ini. Even WordPress uses this filter to evidence you the max upload size allowed, like in the Media Library and Site Health Info screens.

Beneath is an example of this filter in activeness from WordPress correspondent Drew Jaynes. It defines the upload size limit for all not-admin roles.

          /** * Filter the upload size limit for not-administrators. * * @param string $size Upload size limit (in bytes). * @return int (maybe) Filtered size limit. */ role filter_site_upload_size_limit( $size ) { // Ready the upload size limit to 10 MB for users lacking the 'manage_options' capability. if ( ! current_user_can( 'manage_options' ) ) { // ten MB. $size = 1024 * 10000; } return $size; } add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', 20 );        

The above code uses WordPress' manage_options capability to set this limit only for not-admins. You can change the code to target specific user roles or user ids. Read our in-depth WordPress roles and capabilities commodity for more information.

Use a WordPress Plugin

Messing with code using SSH or FTP/SFTP is not for everyone. If you're not comfortable with writing or editing code, you can employ a WordPress plugin instead.

WP Maximum Upload File Size plugin
WP Maximum Upload File Size plugin

We'll be using the WP Maximum Upload File Size plugin here. Equally of writing this, it's the merely up-to-appointment plugin on the WordPress plugin repository that helps yous go this done.

To become started, install and activate the WP Maximum Upload File Size plugin. Side by side, become to its settings screen in your WordPress dashboard. Here, yous can encounter the maximum upload file size set past both your hosting provider and WordPress.

WP Maximum Upload File Size settings screen
WP Maximum Upload File Size settings screen

Here, you can see that the maximum upload file size set past WordPress is lesser than that set past your hosting provider. Hence, yous can crank it up by choosing the Maximum Upload File Size with the dropdown presented.

Note: If you lot want to set a max upload file size limit that'southward larger than the one set by your hosting provider, information technology'south not possible to do it via this plugin. For that, you lot need to contact your hosting provider.

Upload Files via FTP/SFTP

Are you withal struggling with all the above methods? Or with your hosting provider to take them enhance the upload file size limit? You lot can always upload big files via FTP/SFTP.

FileZilla window with a site connected
Drag and drop files to and for your server and figurer with SFTP

If you have a lot of large files to upload, this is the fastest method. You tin read our in-depth tutorial on how to bulk upload files to the WordPress media library for more information.

Sometimes, WordPress doesn't recognize files uploaded via FTP/SFTP. If that'south the case, you can use the free Add together From Server plugin to import the uploaded files into WordPress.

Alternatively, you can practise the aforementioned straight from the command line past importing images using WP-CLI. The wp media import command allows you to create attachments from local files or URLs.

Don't Edit the 'wp-config.php' File

Editing the wp-config.php file doesn't work anymore. We're adding it here considering we've found many web tutorials that list information technology as a legitimate mode to increase the max upload size in WordPress.

It involves going to your site'southward root directory via FTP/SFTP or SSH and and so editing the wp-config.php file.

Finding the 'wp-config.php' file
Finding the 'wp-config.php' file

You lot're suggested to add together the following lawmaking to the wp-config.php file:

          @ini_set( 'upload_max_size' , '64M' ); @ini_set( 'post_max_size', '128M'); @ini_set( 'memory_limit', '256M' );        

Information technology fails to work because yous can only utilise the ini_set() part to set up PHP directives that belong to the PHP_INI_ALL changeable way.

Equally upload_max_size and post_max_size belong to the PHP_INI_PERDIR changeable way. Y'all can only ready them via php.ini, .htaccess, http.conf, or .user.ini.

If you lot've tried this method before without seeing whatever results, at present y'all know why it fails.

Verify Your WordPress Site's New Max Upload File Size

Finally, information technology'due south time to verify whether the new max upload file size limit is implemented in your WordPress site. To do this, follow the same procedure we discussed above to check the max upload file size in WordPress.

Go to your Media Library in the WordPress dashboard and check whether the max upload file size limit has inverse.

Verifying the new max upload file size limit
Verifying the new max upload file size in 'Media Library'

Aye, it has changed. That's a success!

You can also go to the Site Wellness Info panel and bank check for the same under Media Handling and Server dropdowns.

Verifying the new max upload file size limit in 'Site Health Info'
Verifying the new max upload file size in 'Site Health Info > Media Library'
Verifying the new max upload file size limit in 'Site Health Info'
Verifying the new max upload file size in 'Site Health Info > Server'

Don't allow the maximum upload size in WordPress hold yous back! 🙅‍♂️ This guide will show you lot how you lot tin easily increase the limit to adapt your larger files 👇 Click to Tweet

Summary

Every bit you've seen, increasing the maximum upload file size in WordPress isn't too complex. Whether y'all're building a media-heavy portfolio site or installing a big theme, it'south just a thing of knowing where to wait for and what commands or tools to employ.

In most cases, reaching out to your hosting provider should be enough. However, if y'all're stuck with a troublesome host, nosotros've shown yous some culling methods yous can try before migrating to improve hosting.

Get uploading!

Did nosotros cover it all? If you lot've experienced a stubborn instance of upload file size limits, let united states of america know how you managed to fix it.


Save time, costs and maximize site functioning with:

  • Instant assistance from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audience reach with 29 data centers worldwide.
  • Optimization with our congenital-in Application Functioning Monitoring.

All of that and much more than, in one programme with no long-term contracts, assisted migrations, and a 30-solar day-coin-back-guarantee. Check out our plans or talk to sales to notice the plan that'southward correct for you.