A low WordPress upload size limit stops you from uploading large files, plugins, and themes. If you're building a media-heavy website, that tin 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, in that location are many ways to go well-nigh solving this issue. We'll cover them all in this article and show you how to increase the maximum upload size in WordPress quickly.

Let'south dive in!

Prefer to sentinel the video version?

What Is the Maximum Upload Size in WordPress?

Uploading big 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 4 MB to 128 MB. Usually, the hosting provider sets this limit at the server level.

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

To verify this, go to your WordPress site'due south Media Library. Here, try to upload a file that crosses this maximum upload file size limit. You lot'll see an error bulletin that looks something similar 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" mistake can be frustrating, just information technology exists for ii main reasons: security and efficiency. Information technology hinders site owners and other users, including malicious actors, from uploading huge files (e.chiliad. high-resolution images, large videos).

Otherwise, it can result in incapacitating your website's server, making your site come to a crawl. Or worse, information technology can bring your site downwards altogether!

Want to upload a big file, plugin, or theme... but express by the max upload size?🗂 Learn how to resolve this mutual issue quickly & easily correct hither ⬇️ Click to Tweet

How to Check the Current Maximum Upload Size in WordPress

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

In the Media Library

The quickest mode to bank check your site'southward electric current maximum upload size is to get to your WordPress dashboard, and from there, go to Media > Library. Here, click on the Add New push 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 below the Select Files button. If you're using a dissimilar web hosting provider, you may run across a different limit listed here.

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

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

Once again, you lot can run across the 128 MB max upload file size here.

In the Site Wellness Info

WordPress five.ii added the Site Health Info tool to help yous debug your WordPress site ameliorate. Here, you can find almost all the information well-nigh your server and WordPress configuration.

As both the server and WordPress handle the max upload file size, at that place are two means to find its value on this screen.

Offset, you tin can find it listed nether the Media Handling dropdown. Hither, await for the value of Max size of an uploaded file constant.

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

The second method is to look under the Server dropdown. You'll find many options related to your webserver's setup under hither. Please search for the value for Upload max filesize abiding to meet 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 Health Info' panel

Yous can besides meet other PHP constants and their values, such as:

  • PHP post max size: Defines the maximum upload limit for Mail requests.
  • PHP memory limit: Defines the retentivity allocated for PHP. It should be set equal to or college than the Upload max filesize limit. Or else the upload will neglect.

Your web host sets these options. Ordinarily, starter hosting plans will take a bottom upload size limit than enterprise hosting plans. Some hosts may allow you to override these limits. But in near cases, you may need your hosting provider'south assistance (and perhaps a plan upgrade) to increase them.

Why Increase the Maximum Upload File Size in WordPress?

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

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

Now that we've covered the nuts of max upload file size in WordPress, let's learn how to increment information technology.

x Ways to Increase the Max Upload File Size in WordPress

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

Contact Your Hosting Provider for Aid

If you lot're facing issues with uploading files and file size limits, reaching out to your hosting provider for help is one of the quickest solutions. Increasing the upload limit is a fiddling task for tech support, then most hosting companies tin help you fix this issue quickly.

Tinkering with your server or site configuration files can always be a challenge. Hence, nosotros e'er recommend y'all endeavor 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, go 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

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

Increase the Max Upload File Size in WordPress Multisite

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

First, caput to your Network Admin dashboard, and then go to Settings > Network Settings screen. Here, scroll down till y'all discover the Upload Settings department. 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 (~1.5 MB). You lot can change this to a college value and click the Salve Changes button.

Note: 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 it. You can use the methods described above to detect your webserver's configuration.

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

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

You can as well limit the total size of files uploaded to an individual site in the Multisite network. Notwithstanding, it'due south disabled by default.

Update Your '.htaccess' File

If your webserver runs on Apache, you 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, iii 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 department in a higher place. Information technology would aid if y'all modified these 3 directives' values to acknowledge your file sizes. For case, 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

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

Uploads tin can incorporate extra information 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 memory limit in WordPress for more information.

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

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

Open the.htaccess file with a text editor or code editor, and so add together 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        

Y'all can notice ii other PHP directives in the to a higher place lawmaking: max_execution_time and max_input_time . They define how long a server spends on a single PHP chore. The bigger your uploads, the bigger the fourth dimension spent will be. Yous need to set their values to a number that'due south advisable for your utilise example.

Notation: You may get a 500 Internal Server Error after using the method to a higher place. Most likely, it'southward considering your server is running PHP in CGI mode. In such cases, you cannot use the higher up commands in your .htaccess file.

Create or Modify the 'php.ini' File

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

Using SSH or FTP, y'all can find the php.ini file in your WordPress root directory. In some cases, you may not locate it there. Fret not! You can create a new file with the aforementioned 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 afterward making the changes. Some hosts don't allow you to change 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 take configured the server to work with .user.ini files instead of php.ini files.

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

Next, add the post-obit code to your .user.ini file:

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

You lot'll notice that information technology's a repeat of the previous method, except with a different filename.

Change PHP Options via cPanel

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

To get started, get 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

Hither, you can change your server'due south current PHP version and enable/disable many PHP extensions. Click on the Options link in the navigation menu to become to the PHP Options panel.

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 as upload_max_filesize , post_max_size , memory_limit , max_execution_time , and max_input_time . The max values you can prepare hither depend on your current hosting plan.

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

If you take whatsoever doubts most these values, we suggest y'all contact your hosting provider. The latest cPanel dashboard saves changes automatically, so you don't have to click anything. Merely if you're using an older cPanel version, make sure to click the Salve Changes push button.

Increase the Max Upload File Size in Nginx

Nginx is another webserver like Apache, but it's also a lot more. Typically, Nginx tin can handle more concurrent requests than Apache, making information technology 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'll need to modify both your php.ini and nginx.conf files. We've dealt with the erstwhile file earlier. The latter one is chosen an Nginx config file.

On an Nginx server, you can notice the php.ini file at /etc/php/7.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 don't have to set the memory_limit in the above file as Nginx handles it differently. For more than, y'all can check out this Stack Overflow thread. After 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        

Once more, the verbal lawmaking may vary slightly depending on the PHP version installed on your server.

Next, use Nginx'southward client_max_body_size directive to gear up the new max upload size limit. You need to declare this directive in the nginx.conf file, which you tin can detect at /etc/nginx/nginx.conf .

You can declare this directive inside 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 impact a specific site/app hosted by this server.

          server {     ...     client_max_body_size 128M; }        

The location cake only affects the specified directory (e.one thousand. 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 exercise that, y'all can use the post-obit command in your final:

          sudo service nginx reload        

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

Use the WordPress 'upload_size_limit' Filter

WordPress ii.5 introduced the upload_size_limit filter, which filters the maximum upload size allowed in php.ini. Fifty-fifty WordPress uses this filter to show you the max upload size allowed, similar in the Media Library and Site Wellness Info screens.

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

          /** * Filter the upload size limit for not-administrators. * * @param string $size Upload size limit (in bytes). * @render int (maybe) Filtered size limit. */ office filter_site_upload_size_limit( $size ) { // Gear up the upload size limit to x MB for users lacking the 'manage_options' adequacy. 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 in a higher place code uses WordPress' manage_options capability to set this limit only for not-admins. You can alter 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 not for anybody. If you're not comfortable with writing or editing lawmaking, you can use a WordPress plugin instead.

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

Nosotros'll exist using the WP Maximum Upload File Size plugin here. As of writing this, it's the merely up-to-appointment plugin on the WordPress plugin repository that helps you become this done.

To get started, install and actuate the WP Maximum Upload File Size plugin. Next, get to its settings screen in your WordPress dashboard. Hither, you can come across 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

Hither, you can run into that the maximum upload file size set by WordPress is lesser than that set by your hosting provider. Hence, you tin creepo it upwardly past choosing the Maximum Upload File Size with the dropdown presented.

Annotation: If you lot want to ready a max upload file size limit that'due south larger than the one set by your hosting provider, it'south non possible to practise it via this plugin. For that, you lot need to contact your hosting provider.

Upload Files via FTP/SFTP

Are you lot still struggling with all the in a higher place methods? Or with your hosting provider to have them raise the upload file size limit? You can ever upload large 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 big files to upload, this is the fastest method. Yous 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, y'all can use the free Add From Server plugin to import the uploaded files into WordPress.

Alternatively, you can practice the same straight from the control 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 piece of work anymore. We're adding it here because we've establish many web tutorials that list it as a legitimate way to increase the max upload size in WordPress.

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

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

Yous're suggested to add the following 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 can only utilize the ini_set() role to set PHP directives that vest to the PHP_INI_ALL child-bearing fashion.

As upload_max_size and post_max_size vest to the PHP_INI_PERDIR changeable mode. You lot can just gear up them via php.ini, .htaccess, http.conf, or .user.ini.

If you lot've tried this method earlier without seeing any results, at present y'all know why information technology fails.

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

Finally, it's fourth dimension 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 cheque the max upload file size in WordPress.

Go to your Media Library in the WordPress dashboard and cheque 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, information technology has changed. That'south a success!

You can as well go to the Site Health Info panel and check for the aforementioned 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 Wellness Info > Server'

Don't allow the maximum upload size in WordPress hold you back! 🙅‍♂️ This guide will testify yous how you can hands increase the limit to accommodate your larger files 👇 Click to Tweet

Summary

As yous've seen, increasing the maximum upload file size in WordPress isn't too complex. Whether you lot're edifice a media-heavy portfolio site or installing a large theme, it's merely 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 enough. Notwithstanding, if yous're stuck with a troublesome host, nosotros've shown you some alternative methods you tin can attempt before migrating to better hosting.

Go uploading!

Did nosotros cover information technology all? If you've experienced a stubborn instance of upload file size limits, let us know how you managed to ready information technology.


Save time, costs and maximize site performance with:

  • Instant assistance from WordPress hosting experts, 24/vii.
  • Cloudflare Enterprise integration.
  • Global audience reach with 29 information centers worldwide.
  • Optimization with our built-in Application Operation Monitoring.

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