A low WordPress upload size limit stops yous from uploading large files, plugins, and themes. If you're building a media-heavy website, that can exist 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, at that place are many means to go near solving this event. We'll encompass them all in this article and show you how to increase the maximum upload size in WordPress quickly.

Permit's swoop 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'due south resources. To forbid 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 about cases.

To verify this, go to your WordPress site's Media Library. Here, try 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
Error while uploading a large file in WordPress

The "exceeds the maximum upload size for this site" mistake tin exist frustrating, simply it exists for ii main reasons: security and efficiency. It hinders site owners and other users, including malicious actors, from uploading huge files (e.grand. high-resolution images, big videos).

Otherwise, information technology can result in incapacitating your website'southward server, making your site come to a clamber. Or worse, it tin can bring your site down altogether!

Desire to upload a big file, plugin, or theme... but limited by the max upload size?🗂 Learn how to resolve this mutual issue rapidly & easily correct here ⬇️ Click to Tweet

How to Cheque the Current Maximum Upload Size in WordPress

There are many ways to cheque your WordPress site'south electric current max upload size. Permit'south become 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 together 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. bulletin displays below the Select Files button. If you're using a dissimilar web hosting provider, you may encounter a different limit listed here.

Yous tin also get to Media > Add New directly and come across the same bulletin displayed at the bottom.

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

Once more, you lot can see the 128 MB max upload file size hither.

In the Site Health Info

WordPress 5.ii added the Site Wellness Info tool to help you debug your WordPress site improve. Here, yous can detect almost all the information well-nigh your server and WordPress configuration.

As both the server and WordPress handle the max upload file size, there are ii means to find its value on this screen.

First, you can find it listed under the Media Handling dropdown. Hither, 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 Wellness Info' console

The 2d method is to look under the Server dropdown. Yous'll find many options related to your webserver'southward setup under here. Please search for the value for Upload max filesize constant to meet 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

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

  • PHP postal service max size: Defines the maximum upload limit for POST requests.
  • PHP memory limit: Defines the memory allocated for PHP. Information technology should be set equal to or higher than the Upload max filesize limit. Or else the upload volition 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 yous to override these limits. But in most cases, you may need your hosting provider's aid (and mayhap a plan upgrade) to increment them.

Why Increase the Maximum Upload File Size in WordPress?

There are many reasons why yous may demand to increment your WordPress site'south maximum upload file size. Hither are the most mutual ones:

  • You want to install a big theme or plugin straight through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a neat way to keep your readers engaged and return for more. And that includes uploading new images, videos, audios, and other media regularly. All the same, that's non always feasible when in that location's a file size limit for your uploads.
  • You want to upload a large video or image equally your site'due south background or header.
  • You plan to sell digital files such every bit ebooks, photographs, videos, themes, and plugins straight 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, permit's learn how to increment it.

10 Ways to Increase the Max Upload File Size in WordPress

There are many ways you tin can set the WordPress maximum upload size event. Nosotros'll starting time with the easiest ones kickoff, and so nosotros'll move on to the intermediate-level tutorials.

Contact Your Hosting Provider for Help

If you're facing problems 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, and so near hosting companies tin can assist you fix this issue apace.

Tinkering with your server or site configuration files tin ever be a claiming. Hence, nosotros always recommend you try this method first.

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

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

We have representatives to assist you lot in many languages, including English, Castilian, French, German language, Italian, and Portuguese.

Increase the Max Upload File Size in WordPress Multisite

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

Get-go, head to your Network Admin dashboard, so become to Settings > Network Settings screen. Here, whorl down till yous find the Upload Settings section. You'll observe the Max upload file size field in this expanse.

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.v MB). You tin can change this to a higher value and click the Save Changes push.

Note: Yous cannot circumvent the server-level max upload size limit from hither. If the limit you set here is college than the server's max upload size limit, the server will ignore information technology. You can use the methods described above to find your webserver'due south 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 too limit the total size of files uploaded to an individual site in the Multisite network. However, information technology's disabled past 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 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 Wellness Info section above. It would help if you modified these 3 directives' values to admit your file sizes. For instance, if the largest file you're planning to upload is 32 MB, nosotros recommend the post-obit settings:

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

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

Uploads can contain extra data in add-on to the file itself. Then, giving all other upload-related directives some breathing space is a good idea. Y'all tin can read our in-depth tutorial on how to improve PHP memory limit in WordPress for more data.

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

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

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

          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 2 other PHP directives in the above lawmaking: max_execution_time and max_input_time . They ascertain how long a server spends on a single PHP task. The bigger your uploads, the bigger the time spent will be. You need to set their values to a number that'due south appropriate for your utilize case.

Note: Yous may get a 500 Internal Server Error after using the method to a higher place. Most likely, information technology's because your server is running PHP in CGI mode. In such cases, you cannot use the to a higher place commands in your .htaccess file.

Create or Modify the 'php.ini' File

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

Using SSH or FTP, you can discover the php.ini file in your WordPress root directory. In some cases, you may not locate information technology there. Fret not! You lot can create a new file with the same proper noun in your site's root directory.

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

With a code or text editor, add together the following lawmaking 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 after making the changes. Some hosts don't permit you to modify PHP settings via this method. In such a case, you can proceed to try the following solution instead.

Subscribe Now

Create or Modify the '.user.ini' File

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

Like php.ini and .htaccess files, you can find the .user.ini in your site's root directory. If you tin't observe information technology, and so you 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.

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

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

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

Modify PHP Options via cPanel

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

To get 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, you can modify your server'due south current PHP version and enable/disable many PHP extensions. Click on the Options link in the navigation carte to go to the PHP Options panel.

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

Ringlet down here to change 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 hither depend on your current hosting plan.

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

If you lot have any doubts nearly these values, we suggest you 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, make sure to click the Relieve Changes button.

Increment the Max Upload File Size in Nginx

Nginx is another webserver similar Apache, but it's likewise a lot more. Typically, Nginx tin handle more concurrent requests than Apache, making it a lot faster. Kinsta uses Nginx to power its performance-optimized hosting solutions for WordPress.

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

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

          upload_max_filesize = 64M post_max_size = 128M        

Y'all don't accept to set the memory_limit in the higher up file as Nginx handles it differently. For more, you lot can bank check out this Stack Overflow thread. After saving your php.ini file, enable the changes by restarting PHP-FPM using the below code in your terminal:

          sudo service php7.iv-fpm restart        

Again, the verbal code may vary slightly depending on the PHP version installed on your server.

Next, use Nginx's client_max_body_size directive to set the new max upload size limit. Y'all need to declare this directive in the nginx.conf file, which you tin discover at /etc/nginx/nginx.conf .

Y'all can declare this directive within the http {...} block, the server {...} block, or the location {...} cake.

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

          http {     ...     client_max_body_size 128M; }        

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

          server {     ...     client_max_body_size 128M; }        

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

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

Don't forget to salve the file and restart Nginx to apply the changes. To exercise that, yous can employ the following control in your terminal:

          sudo service nginx reload        

If y'all're a Kinsta customer, you tin't access your Nginx config straight. Even so, you lot tin can achieve out to our support team, and they can apace make the changes for you lot.

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. Fifty-fifty WordPress uses this filter to show you lot the max upload size allowed, like in the Media Library and Site Health Info screens.

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

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

The above code uses WordPress' manage_options adequacy to ready 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.

Use a WordPress Plugin

Messing with code using SSH or FTP/SFTP is non for anybody. If you're not comfortable with writing or editing code, you can use 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. As of writing this, it'south the only upwards-to-date plugin on the WordPress plugin repository that helps yous become this done.

To go started, install and activate the WP Maximum Upload File Size plugin. Next, go to its settings screen in your WordPress dashboard. Here, you tin come across the maximum upload file size ready by both your hosting provider and WordPress.

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

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

Note: If you desire to set a max upload file size limit that'south larger than the one set by your hosting provider, it's non possible to do it via this plugin. For that, yous need to contact your hosting provider.

Upload Files via FTP/SFTP

Are you lot notwithstanding struggling with all the to a higher place methods? Or with your hosting provider to have them heighten the upload file size limit? You can always upload big files via FTP/SFTP.

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

If you have a lot of large files to upload, this is the fastest method. Y'all 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'due south the case, y'all can use the costless Add From Server plugin to import the uploaded files into WordPress.

Alternatively, you can practice the same straight from the command line by 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 piece of work anymore. We're adding it here because we've found many web tutorials that list it as a legitimate manner to increment 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

Y'all're suggested to add 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 piece of work because y'all tin can only utilize the ini_set() function to prepare 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 tin can only set them via php.ini, .htaccess, http.conf, or .user.ini.

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

Verify Your WordPress Site'due south New Max Upload File Size

Finally, it's time to verify whether the new max upload file size limit is implemented in your WordPress site. To do this, follow the same process 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'

Yep, it has inverse. That's a success!

Yous can also go to the Site Health Info panel and check for the same under Media Treatment 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 let the maximum upload size in WordPress hold you back! 🙅‍♂️ This guide will prove you how you can easily increment the limit to conform your larger files 👇 Click to Tweet

Summary

As you've seen, increasing the maximum upload file size in WordPress isn't besides complex. Whether you're building a media-heavy portfolio site or installing a large theme, it's simply a matter of knowing where to look for and what commands or tools to use.

In most cases, reaching out to your hosting provider should be plenty. Even so, if y'all're stuck with a troublesome host, we've shown you some alternative methods you can try earlier migrating to better hosting.

Get uploading!

Did nosotros encompass information technology all? If you've experienced a stubborn case of upload file size limits, permit us know how yous managed to fix it.


Salvage time, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audition attain with 29 data centers worldwide.
  • Optimization with our built-in Application Performance Monitoring.

All of that and much more, in one program with no long-term contracts, assisted migrations, and a xxx-solar day-money-dorsum-guarantee. Check out our plans or talk to sales to notice the plan that's right for y'all.