A low WordPress upload size limit stops you from uploading large files, plugins, and themes. If y'all're building a media-heavy website, that tin exist a considerable obstacle. It'due south 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 upshot. Nosotros'll comprehend them all in this article and show yous how to increase the maximum upload size in WordPress quickly.

Let'southward dive in!

Prefer to picket the video version?

What Is the Maximum Upload Size in WordPress?

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

WordPress besides includes constants that define this limit, but they cannot override the server-level settings in most 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 lot'll run across an error message that looks something similar this:

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

The "exceeds the maximum upload size for this site" error tin exist frustrating, merely it exists for two principal reasons: security and efficiency. It hinders site owners and other users, including malicious actors, from uploading huge files (e.g. loftier-resolution images, large videos).

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

Want to upload a large file, plugin, or theme... just limited past the max upload size?🗂 Learn how to resolve this common consequence quickly & easily right here ⬇️ Click to Tweet

How to Check the Current Maximum Upload Size in WordPress

There are many ways to check your WordPress site'due south current max upload size. Let'southward 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, become to Media > Library. Here, click on the Add together New button to actuate 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 lot're using a different web hosting provider, y'all may see a different limit listed here.

You can also go to Media > Add New direct and see the same bulletin displayed at the bottom.

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

Again, you can see the 128 MB max upload file size here.

In the Site Health Info

WordPress v.two added the Site Health Info tool to help you debug your WordPress site better. Hither, you can find almost all the information about 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.

Showtime, yous can find it listed nether the Media Handling dropdown. Here, 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' console

The second method is to look nether the Server dropdown. You lot'll find many options related to your webserver's setup under here. Please search for the value for Upload max filesize abiding to see 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 can besides meet other PHP constants and their values, such every bit:

  • PHP post max size: Defines the maximum upload limit for Mail requests.
  • PHP retentivity 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 will fail.

Your spider web host sets these options. Normally, starter hosting plans volition have a lesser upload size limit than enterprise hosting plans. Some hosts may allow y'all to override these limits. Just in most cases, you lot may need your hosting provider's assistance (and perhaps a programme upgrade) to increment them.

Why Increase the Maximum Upload File Size in WordPress?

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

  • You want to install a large theme or plugin directly through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a great way to proceed your readers engaged and return for more. And that includes uploading new images, videos, audios, and other media regularly. Even so, that's non always viable when at that place'due south a file size limit for your uploads.
  • You want to upload a large video or image as your site'southward background or header.
  • You program 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).

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

ten Ways to Increment the Max Upload File Size in WordPress

There are many ways you tin can set up the WordPress maximum upload size issue. We'll showtime with the easiest ones outset, and 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 1 of the quickest solutions. Increasing the upload limit is a trivial task for tech support, and then most hosting companies can aid you lot gear up this event speedily.

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

If you lot're hosting your site with Kinsta, our knowledgeable support team is merely a click abroad and available 24/vii. 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 back up easily through MyKinsta

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

Increment the Max Upload File Size in WordPress Multisite

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

First, caput to your Network Admin dashboard, and and so go to Settings > Network Settings screen. Here, roll down till you find the Upload Settings department. Y'all'll observe 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). You can change this to a college value and click the Relieve Changes push.

Note: You cannot circumvent the server-level max upload size limit from hither. If the limit yous set here is higher than the server'southward max upload size limit, the server will ignore information technology. You can use the methods described above 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 prepare the new max upload file size to 131072 KB (~128 MB).

You can also limit the full 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'southward .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

Nosotros've already discussed them in the Site Health Info section above. Information technology would assist if you modified these three directives' values to admit 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 employ M instead of MB. That'southward how PHP handles its directives.

Uploads can incorporate extra information in addition to the file itself. And then, giving all other upload-related directives some breathing infinite is a good idea. You can read our in-depth tutorial on how to better PHP memory limit in WordPress for more information.

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 together 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 tin notice two other PHP directives in the in a higher place code: 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 time spent will exist. You need to set their values to a number that'south advisable for your use example.

Annotation: You may get a 500 Internal Server Error later using the method above. Virtually likely, it's because your server is running PHP in CGI mode. In such cases, y'all cannot apply the above 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, you tin can find the php.ini file in your WordPress root directory. In some cases, y'all may not locate information technology at that place. Fret not! You can create a new file with the same proper 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 code or text editor, add 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 relieve your file later making the changes. Some hosts don't allow yous to change PHP settings via this method. In such a instance, you can proceed to try the post-obit 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, yous can find the .user.ini in your site's root directory. If you tin't find information technology, then 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 together the post-obit code to your .user.ini file:

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

You'll notice that it'due south 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 you manage your server and site configuration, y'all can modify the max upload file size through its interface.

To get started, become 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 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 get to the PHP Options panel.

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

Curl down hither 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 fix here depend on your electric current hosting plan.

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

If you have whatever doubts about these values, nosotros suggest you contact your hosting provider. The latest cPanel dashboard saves changes automatically, so you don't take to click anything. But if y'all're using an older cPanel version, make sure to click the Salvage Changes push.

Increase the Max Upload File Size in Nginx

Nginx is another webserver similar Apache, but it'due south as well a lot more. Typically, Nginx can handle more concurrent requests than Apache, making it a lot faster. Kinsta uses Nginx to power its operation-optimized hosting solutions for WordPress.

If yous're running your WordPress site on Nginx, you'll demand 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 lot can find the php.ini file at /etc/php/vii.4/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        

Yous don't have to ready the memory_limit in the above file as Nginx handles it differently. For more than, you can 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 concluding:

          sudo service php7.four-fpm restart        

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

Adjacent, 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 tin observe 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 block will touch on all the sites/apps hosted on this server.

          http {     ...     client_max_body_size 128M; }        

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

          server {     ...     client_max_body_size 128M; }        

The location block only affects the specified directory (e.thou. 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 practice that, you can utilise the following command in your terminal:

          sudo service nginx reload        

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

Use the WordPress 'upload_size_limit' Filter

WordPress ii.v 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.

Beneath is an example of this filter in action from WordPress correspondent 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 (maybe) Filtered size limit. */ function filter_site_upload_size_limit( $size ) { // Set up the upload size limit to 10 MB for users lacking the 'manage_options' capability. if ( ! current_user_can( 'manage_options' ) ) { // 10 MB. $size = 1024 * 10000; } render $size; } add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', 20 );        

The above lawmaking uses WordPress' manage_options capability to set this limit merely for non-admins. You lot can modify the code to target specific user roles or user ids. Read our in-depth WordPress roles and capabilities article for more data.

Use a WordPress Plugin

Messing with code using SSH or FTP/SFTP is non for everyone. If you lot're not comfy with writing or editing code, you tin 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's the merely upwards-to-date plugin on the WordPress plugin repository that helps you get this washed.

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 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, yous can see that the maximum upload file size set past WordPress is lesser than that set by your hosting provider. Hence, you can creepo it upwards by choosing the Maximum Upload File Size with the dropdown presented.

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

Upload Files via FTP/SFTP

Are you nonetheless struggling with all the above methods? Or with your hosting provider to have them raise the upload file size limit? Yous can always upload large files via FTP/SFTP.

FileZilla window with a site connected
Drag and driblet 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. Yous tin can read our in-depth tutorial on how to bulk upload files to the WordPress media library for more data.

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

Alternatively, you lot can practise the same 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. Nosotros're adding it hither because we've found many web tutorials that list it as a legitimate manner to increase the max upload size in WordPress.

It involves going to your site'due south 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 together 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 considering you can just use the ini_set() role to set PHP directives that belong to the PHP_INI_ALL changeable fashion.

As upload_max_size and post_max_size belong to the PHP_INI_PERDIR changeable mode. You tin but set them via php.ini, .htaccess, http.conf, or .user.ini.

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

Verify Your WordPress Site's New Max Upload File Size

Finally, information technology's time to verify whether the new max upload file size limit is implemented in your WordPress site. To do this, follow the aforementioned procedure we discussed above to cheque 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'south a success!

You can also become to the Site Health Info panel and check for the same nether 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 concur you lot dorsum! 🙅‍♂️ This guide volition bear witness you how you tin easily increase the limit to accommodate your larger files 👇 Click to Tweet

Summary

As you lot've seen, increasing the maximum upload file size in WordPress isn't too complex. Whether you're edifice a media-heavy portfolio site or installing a big theme, information technology's merely a matter of knowing where to look for and what commands or tools to use.

In nearly 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 you tin endeavour before migrating to better hosting.

Get uploading!

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


Save time, costs and maximize site performance with:

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

All of that and much more, in 1 plan with no long-term contracts, assisted migrations, and a 30-mean solar day-coin-back-guarantee. Cheque out our plans or talk to sales to detect the program that'southward correct for you.