A low WordPress upload size limit stops yous from uploading large files, plugins, and themes. If you're edifice a media-heavy website, that can exist a considerable obstruction. Information technology's necessary to increment 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 become about solving this issue. Nosotros'll cover them all in this article and show y'all how to increase the maximum upload size in WordPress apace.

Permit's swoop in!

Prefer to watch the video version?

What Is the Maximum Upload Size in WordPress?

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

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

To verify this, go to your WordPress site'southward Media Library. Here, endeavor to upload a file that crosses this maximum upload file size limit. You'll see an error message that looks something like this:

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

The "exceeds the maximum upload size for this site" fault can be frustrating, but information technology exists for two main reasons: security and efficiency. It hinders site owners and other users, including malicious actors, from uploading huge files (due east.yard. high-resolution images, large videos).

Otherwise, it can upshot in incapacitating your website's server, making your site come to a crawl. Or worse, it tin bring your site down altogether!

Want to upload a large file, plugin, or theme... merely limited by the max upload size?🗂 Acquire how to resolve this common issue quickly & hands right hither ⬇️ Click to Tweet

How to Bank check the Current Maximum Upload Size in WordPress

There are many ways to cheque your WordPress site's current max upload size. Let'south go through all of them.

In the Media Library

The quickest mode to check your site's current maximum upload size is to go to your WordPress dashboard, and from there, go to Media > Library. Here, 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

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

Yous tin can also go to Media > Add New directly and see the same message displayed at the bottom.

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

Again, you tin run across the 128 MB max upload file size here.

In the Site Health Info

WordPress 5.two added the Site Wellness Info tool to help you debug your WordPress site better. Hither, you can observe about all the information about your server and WordPress configuration.

As both the server and WordPress handle the max upload file size, there are two ways to observe its value on this screen.

Commencement, you can find it listed under the Media Handling dropdown. Here, await for the value of Max size of an uploaded file abiding.

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

The 2d method is to look nether the Server dropdown. You'll notice many options related to your webserver's setup under hither. Please search for the value for Upload max filesize constant to see what information technology 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 Wellness Info' console

You tin also see other PHP constants and their values, such as:

  • PHP mail max size: Defines the maximum upload limit for POST requests.
  • PHP retention limit: Defines the memory allocated for PHP. It should be set equal to or higher than the Upload max filesize limit. Or else the upload will neglect.

Your spider web host sets these options. Usually, starter hosting plans volition take a lesser upload size limit than enterprise hosting plans. Some hosts may allow yous to override these limits. Simply in almost cases, you may need your hosting provider's help (and possibly a plan upgrade) to increase them.

Why Increase the Maximum Upload File Size in WordPress?

There are many reasons why you may need to increase your WordPress site'due south maximum upload file size. Here are the nigh mutual ones:

  • Yous want to install a large theme or plugin directly through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a peachy way to go on your readers engaged and return for more. And that includes uploading new images, videos, audios, and other media regularly. Still, that's not always feasible when there's a file size limit for your uploads.
  • You desire to upload a large video or epitome equally your site's background or header.
  • You program to sell digital files such as ebooks, photographs, videos, themes, and plugins directly from your site. Sometimes, these files tin 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'due south larn how to increase it.

10 Ways to Increase the Max Upload File Size in WordPress

At that place are many means you can fix the WordPress maximum upload size upshot. We'll start with the easiest ones showtime, and so we'll move on to the intermediate-level tutorials.

Contact Your Hosting Provider for Help

If yous're facing issues with uploading files and file size limits, reaching out to your hosting provider for assistance is one of the quickest solutions. Increasing the upload limit is a trivial task for tech support, so most hosting companies can help you set this issue rapidly.

Tinkering with your server or site configuration files tin can e'er be a challenge. Hence, we always recommend you endeavour this method get-go.

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

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

Nosotros have representatives to assist you lot in many languages, including English, Spanish, French, German, Italian, and Portuguese.

Increase the Max Upload File Size in WordPress Multisite

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

First, head to your Network Admin dashboard, and then become to Settings > Network Settings screen. Here, scroll down till you lot find the Upload Settings department. You lot'll find 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 (~i.5 MB). You lot can change this to a higher value and click the Salvage Changes button.

Annotation: You cannot circumvent the server-level max upload size limit from here. If the limit you prepare here is higher than the server's max upload size limit, the server volition ignore information technology. You can use the methods described to a higher place 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 fix the new max upload file size to 131072 KB (~128 MB).

You can as well limit the full size of files uploaded to an individual site in the Multisite network. Nonetheless, information technology's disabled by default.

Update Your '.htaccess' File

If your webserver runs on Apache, you can update your site's .htaccess file to increment the max upload size in WordPress. Yous tin find your .htaccess file in the WordPress site's root directory.

As 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 above. It would assistance 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, nosotros 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 contain extra data in addition to the file itself. So, giving all other upload-related directives some breathing space is a good idea. You can read our in-depth tutorial on how to improve PHP retentiveness limit in WordPress for more information.

Admission your .htaccess file via FTP/SFTP or your hosting provider's File Manager.

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

Open the.htaccess file with a text editor or code editor, and then add the post-obit 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 detect two other PHP directives in the above code: max_execution_time and max_input_time . They define how long a server spends on a unmarried PHP task. The bigger your uploads, the bigger the time spent volition be. You lot need to set up their values to a number that's appropriate for your employ example.

Note: You may get a 500 Internal Server Error after using the method above. Nearly likely, information technology's because your server is running PHP in CGI manner. In such cases, you cannot apply the above 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 ascertain file timeouts, max upload size, and resource limits.

Using SSH or FTP, you lot can find the php.ini file in your WordPress root directory. In some cases, you may non locate information technology there. Fret non! Yous can create a new file with the same name in your site'southward 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 salvage your file after making the changes. Some hosts don't allow you to change PHP settings via this method. In such a case, yous can proceed to effort the following solution instead.

Subscribe At present

Create or Modify the '.user.ini' File

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

Like php.ini and .htaccess files, you lot tin can notice the .user.ini in your site'southward root directory. If you tin can't discover it, and then yous can create a new .user.ini file in the aforementioned location. Follow the same procedure described in the previous method to create a newphp.ini file.

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

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

You'll detect that it's a echo of the previous method, except with a different filename.

Change PHP Options via cPanel

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

To go started, go to your cPanel dashboard, and select the Select PHP Version under the Software section.

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 bill of fare to become to the PHP Options panel.

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

Curl down hither to modify the values of PHP directives such as upload_max_filesize , post_max_size , memory_limit , max_execution_time , and max_input_time . The max values you can set up here depend on your electric current hosting plan.

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

If y'all have any doubts about these values, we suggest yous contact your hosting provider. The latest cPanel dashboard saves changes automatically, so you don't accept to click anything. Only if you lot're using an older cPanel version, brand sure to click the Save Changes button.

Increment the Max Upload File Size in Nginx

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

If y'all're running your WordPress site on Nginx, you lot'll demand to alter both your php.ini and nginx.conf files. We've dealt with the former file before. The latter i is called an Nginx config file.

On an Nginx server, y'all can find the php.ini file at /etc/php/seven.4/fpm/php.ini . Depending on which PHP version y'all've installed, the exact path may vary slightly.

          upload_max_filesize = 64M post_max_size = 128M        

You don't have to gear up the memory_limit in the above file equally Nginx handles information technology differently. For more, you can bank check out this Stack Overflow thread. Later on saving your php.ini file, enable the changes by restarting PHP-FPM using the below lawmaking in your concluding:

          sudo service php7.4-fpm restart        

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

Side by side, use Nginx'southward client_max_body_size directive to set the new max upload size limit. You need to declare this directive in the nginx.conf file, which you tin can observe at /etc/nginx/nginx.conf .

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

Setting information technology in the http cake volition affect all the sites/apps hosted on this server.

          http {     ...     client_max_body_size 128M; }        

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

          server {     ...     client_max_body_size 128M; }        

The location block only affects the specified directory (e.g. files, uploads) inside a site/app.

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

Don't forget to salvage the file and restart Nginx to apply the changes. To do that, you lot can use the following command in your last:

          sudo service nginx reload        

If y'all're a Kinsta client, yous can't access your Nginx config directly. However, you lot can reach out to our support team, and they can apace brand the changes for y'all.

Use the WordPress 'upload_size_limit' Filter

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

Below is an example of this filter in action from WordPress contributor Drew Jaynes. It defines the upload size limit for all non-admin roles.

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

The higher up code uses WordPress' manage_options capability to gear up this limit only for non-admins. You can modify the code to target specific user roles or user ids. Read our in-depth WordPress roles and capabilities article for more information.

Apply a WordPress Plugin

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

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

Nosotros'll be using the WP Maximum Upload File Size plugin here. As of writing this, it's the just upward-to-date plugin on the WordPress plugin repository that helps you get this washed.

To get started, install and actuate the WP Maximum Upload File Size plugin. Next, go to its settings screen in your WordPress dashboard. Here, you can see the maximum upload file size set by both your hosting provider and WordPress.

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

Here, you tin meet that the maximum upload file size set by WordPress is lesser than that set by your hosting provider. Hence, you can creepo information technology upward by choosing the Maximum Upload File Size with the dropdown presented.

Note: If yous want to ready a max upload file size limit that's larger than the one fix by your hosting provider, information technology'southward not possible to exercise information technology via this plugin. For that, yous demand to contact your hosting provider.

Upload Files via FTP/SFTP

Are you lot still struggling with all the higher up methods? Or with your hosting provider to take them enhance the upload file size limit? You lot tin ever upload large files via FTP/SFTP.

FileZilla window with a site connected
Elevate and driblet files to and for your server and calculator with SFTP

If you take a lot of big 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's the case, you can use the gratis Add From Server plugin to import the uploaded files into WordPress.

Alternatively, you tin do the aforementioned straight from the command line by importing images using WP-CLI. The wp media import control 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 information technology here because nosotros've constitute many spider web tutorials that listing information technology as a legitimate way to increase the max upload size in WordPress.

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

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

Yous're suggested to add together the post-obit code to the wp-config.php file:

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

It fails to work because you lot can only use the ini_set() office to set PHP directives that belong to the PHP_INI_ALL changeable mode.

As upload_max_size and post_max_size vest to the PHP_INI_PERDIR changeable mode. You can only set them via php.ini, .htaccess, http.conf, or .user.ini.

If you've tried this method earlier without seeing any results, now you know why it fails.

Verify Your WordPress Site'southward New Max Upload File Size

Finally, it'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 changed.

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

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

You lot can also get to the Site Health Info panel and 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 Wellness 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 let the maximum upload size in WordPress hold you back! 🙅‍♂️ This guide will show y'all how you tin easily increase the limit to accommodate your larger files 👇 Click to Tweet

Summary

As y'all'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 large theme, it's just a thing of knowing where to look for and what commands or tools to use.

In about cases, reaching out to your hosting provider should be plenty. However, if you're stuck with a troublesome host, we've shown you some alternative methods yous can endeavour before migrating to better hosting.

Get uploading!

Did we encompass it all? If you've experienced a stubborn instance of upload file size limits, let us know how you managed to set information technology.


Save time, costs and maximize site performance with:

  • Instant assist from WordPress hosting experts, 24/vii.
  • Cloudflare Enterprise integration.
  • Global audience accomplish with 29 data centers worldwide.
  • Optimization with our built-in Awarding Performance Monitoring.

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