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 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 means to go well-nigh solving this issue. We'll encompass them all in this article and show you how to increase the maximum upload size in WordPress quickly.

Let's dive in!

Prefer to sentry 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 forbid 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 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, effort to upload a file that crosses this maximum upload file size limit. Y'all'll come across an fault bulletin that looks something similar 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 2 chief reasons: security and efficiency. Information technology hinders site owners and other users, including malicious actors, from uploading huge files (e.k. high-resolution images, large videos).

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

Want to upload a large file, plugin, or theme... but limited past the max upload size?🗂 Acquire how to resolve this common consequence apace & hands right here ⬇️ Click to Tweet

How to Bank check the Current Maximum Upload Size in WordPress

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

In the Media Library

The quickest way to check your site's current maximum upload size is to go to your WordPress dashboard, and from in that location, 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

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

You tin 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

Again, y'all tin can come across the 128 MB max upload file size here.

In the Site Health Info

WordPress five.ii added the Site Health Info tool to help you debug your WordPress site improve. Here, you tin discover nigh all the data about your server and WordPress configuration.

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

Offset, you can notice it listed under the Media Handling dropdown. Hither, look 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' panel

The 2nd method is to look under the Server dropdown. You'll find many options related to your webserver's setup under here. Please search for the value for Upload max filesize constant to encounter 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 Wellness Info' panel

You tin can too see 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 memory allocated for PHP. It should be ready equal to or higher than the Upload max filesize limit. Or else the upload will fail.

Your web host sets these options. Ordinarily, starter hosting plans will take a lesser upload size limit than enterprise hosting plans. Some hosts may allow you to override these limits. Simply in most cases, you may demand your hosting provider's assistance (and mayhap a plan upgrade) to increase them.

Why Increase the Maximum Upload File Size in WordPress?

In that location are many reasons why you may demand to increase your WordPress site'southward maximum upload file size. Here are the most common ones:

  • You want to install a large theme or plugin directly through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a great manner to keep your readers engaged and render for more. And that includes uploading new images, videos, audios, and other media regularly. However, that's non ever feasible when there'due south a file size limit for your uploads.
  • You desire to upload a large video or epitome every bit your site'southward background or header.
  • You plan to sell digital files such every bit ebooks, photographs, videos, themes, and plugins direct from your site. Sometimes, these files can run up to hundreds of megabytes (or more).

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

10 Ways to Increase the Max Upload File Size in WordPress

At that place are many ways you tin gear up the WordPress maximum upload size upshot. We'll start with the easiest ones beginning, and then we'll move on to the intermediate-level tutorials.

Contact Your Hosting Provider for Help

If you're facing issues with uploading files and file size limits, reaching out to your hosting provider for assistance is ane of the quickest solutions. Increasing the upload limit is a petty task for tech support, so about hosting companies tin help you lot fix this upshot quickly.

Tinkering with your server or site configuration files can e'er exist a challenge. Hence, we always recommend you effort this method first.

If you lot're hosting your site with Kinsta, our knowledgeable back up squad is merely a click abroad and bachelor 24/7. To get started, get to your MyKinsta dashboard and click the conversation icon in the bottom right corner.

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

We accept representatives to aid y'all 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, then you can modify the max upload file size for your network.

First, head to your Network Admin dashboard, and and so become to Settings > Network Settings screen. Here, curl down till you find the Upload Settings department. You'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). Y'all can alter this to a college value and click the Salve Changes push.

Note: Yous cannot circumvent the server-level max upload size limit from hither. If the limit you lot set hither is higher than the server's max upload size limit, the server will ignore it. Y'all can use the methods described in a higher place to find your webserver'southward 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 private site in the Multisite network. Yet, information technology's disabled by default.

Update Your '.htaccess' File

If your webserver runs on Apache, you tin update your site's .htaccess file to increment the max upload size in WordPress. You can 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. Information technology would help if you modified these three directives' values to acknowledge your file sizes. For example, 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 Yard instead of MB. That's how PHP handles its directives.

Uploads tin contain extra information in addition to the file itself. Then, giving all other upload-related directives some breathing space is a good idea. Yous can read our in-depth tutorial on how to amend PHP retentivity limit in WordPress for more data.

Access 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 lot can discover ii 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 volition be. You lot need to set their values to a number that's appropriate for your employ instance.

Annotation: Y'all may get a 500 Internal Server Error after using the method above. Most likely, it's because your server is running PHP in CGI mode. In such cases, yous cannot utilize the to a higher place 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 resources limits.

Using SSH or FTP, you can find the php.ini file in your WordPress root directory. In some cases, y'all may not locate information technology in that location. 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 code or text editor, add together the post-obit 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 afterwards making the changes. Some hosts don't allow you lot to modify PHP settings via this method. In such a case, yous can go along to endeavor the following solution instead.

Subscribe At present

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.

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

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

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

You lot'll notice that it'due south a repeat of the previous method, except with a different filename.

Alter PHP Options via cPanel

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

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

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

Here, you tin change your server's current PHP version and enable/disable many PHP extensions. Click on the Options link in the navigation card to go to the PHP Options panel.

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

Ringlet downwardly 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 tin can set here depend on your current hosting plan.

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

If you have any doubts most these values, we advise you contact your hosting provider. The latest cPanel dashboard saves changes automatically, so you don't have to click annihilation. Merely if yous're using an older cPanel version, make sure to click the Salve Changes push.

Increase the Max Upload File Size in Nginx

Nginx is another webserver like Apache, but it's likewise a lot more than. Typically, Nginx 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, yous'll need to alter both your php.ini and nginx.conf files. We've dealt with the former file earlier. The latter one is called an Nginx config file.

On an Nginx server, you can notice the php.ini file at /etc/php/7.four/fpm/php.ini . Depending on which PHP version yous'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 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.4-fpm restart        

Again, the exact 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. You need to declare this directive in the nginx.conf file, which you can find at /etc/nginx/nginx.conf .

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

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 cake just 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 use the changes. To do that, you lot tin use the following command in your terminal:

          sudo service nginx reload        

If you lot're a Kinsta customer, you lot tin't access your Nginx config directly. Even so, you can accomplish out to our back up squad, and they can quickly make the changes for you.

Apply 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 show you lot the max upload size immune, like in the Media Library and Site Health Info screens.

Below is an example of this filter in activity from WordPress contributor Drew Jaynes. Information technology 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 (mayhap) Filtered size limit. */ office filter_site_upload_size_limit( $size ) { // Prepare the upload size limit to 10 MB for users lacking the 'manage_options' adequacy. 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 higher up code uses WordPress' manage_options adequacy to set up this limit only for not-admins. Y'all can modify the lawmaking 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 lawmaking using SSH or FTP/SFTP is not for everyone. If you're not comfy with writing or editing lawmaking, y'all can apply a WordPress plugin instead.

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

We'll exist using the WP Maximum Upload File Size plugin here. Equally of writing this, information technology's the merely upwardly-to-appointment plugin on the WordPress plugin repository that helps you lot get this washed.

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

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

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

Note: If you want to set a max upload file size limit that'south larger than the one set past your hosting provider, information technology's 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 however struggling with all the above methods? Or with your hosting provider to have them enhance the upload file size limit? You can ever 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. You can 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 example, you can utilize the free Add together From Server plugin to import the uploaded files into WordPress.

Alternatively, yous can practise the same straight from the command line past importing images using WP-CLI. The wp media import control allows you lot 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 hither because nosotros've found 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 then editing the wp-config.php file.

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

You'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 work because you can but utilize the ini_set() role to set PHP directives that belong to the PHP_INI_ALL changeable mode.

Every bit upload_max_size and post_max_size belong to the PHP_INI_PERDIR changeable manner. You can only fix 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 information technology fails.

Verify Your WordPress Site's 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 procedure we discussed above to check the max upload file size in WordPress.

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

You tin can likewise go to the Site Wellness 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 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 you back! 🙅‍♂️ This guide will show yous how yous can easily increment the limit to accommodate your larger files 👇 Click to Tweet

Summary

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

In most cases, reaching out to your hosting provider should be enough. Nevertheless, if you're stuck with a troublesome host, nosotros've shown y'all some alternative methods you tin endeavor before migrating to amend hosting.

Get uploading!

Did we cover information technology all? If you've experienced a stubborn case of upload file size limits, let u.s. know how you managed to fix information technology.


Salvage time, costs and maximize site performance with:

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

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