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 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, there are many ways to go about solving this issue. We'll cover them all in this article and prove you how to increase the maximum upload size in WordPress rapidly.

Let'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'due south resources. To preclude 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 too includes constants that define this limit, but they cannot override the server-level settings in most cases.

To verify this, get 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 mistake 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" fault can be frustrating, only it exists for two principal reasons: security and efficiency. It hinders site owners and other users, including malicious actors, from uploading huge files (e.1000. high-resolution images, large videos).

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

Want to upload a large file, plugin, or theme... simply limited by the max upload size?🗂 Learn how to resolve this common issue apace & easily right 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. Permit's go through all of them.

In the Media Library

The quickest way to cheque your site'due south current maximum upload size is to go to your WordPress dashboard, and from there, go to Media > Library. Hither, click on the Add New push to actuate the media uploader tool.

The "Maximum upload size limit" in WordPress
The "Maximum upload size limit" in WordPress

Every bit Kinsta hosts this site, the Maximum upload file size: 128 MB. message displays below the Select Files button. If you're using a different spider web hosting provider, you may see a different limit listed here.

Y'all tin also go to Media > Add together New direct and come across the same message 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.2 added the Site Wellness Info tool to help you debug your WordPress site better. Here, you can find almost all the information nigh your server and WordPress configuration.

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

Outset, you tin notice it listed under the Media Handling dropdown. Here, look for the value of Max size of an uploaded file constant.

'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 lot'll find many options related to your webserver's 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' console

You can as well 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. It should be set up equal to or higher than the Upload max filesize limit. Or else the upload volition fail.

Your web host sets these options. Unremarkably, starter hosting plans volition have a lesser upload size limit than enterprise hosting plans. Some hosts may allow yous to override these limits. But in most cases, yous may need your hosting provider'southward assistance (and perhaps a plan upgrade) to increase them.

Why Increase the Maximum Upload File Size in WordPress?

At that place are many reasons why yous may need to increment your WordPress site's maximum upload file size. Hither are the most common ones:

  • Yous want to install a large theme or plugin directly through the WordPress admin dashboard.
  • Updating your WordPress site regularly is a keen way to continue your readers engaged and return for more. And that includes uploading new images, videos, audios, and other media regularly. All the same, that'southward not always feasible when in that location's a file size limit for your uploads.
  • You lot want to upload a large video or prototype equally your site'due south background or header.
  • You plan to sell digital files such as ebooks, photographs, videos, themes, and plugins directly from your site. Sometimes, these files can sew to hundreds of megabytes (or more).

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

10 Ways to Increase the Max Upload File Size in WordPress

There are many ways you tin fix the WordPress maximum upload size issue. We'll first with the easiest ones first, and then nosotros'll motion on to the intermediate-level tutorials.

Contact Your Hosting Provider for Aid

If you're facing bug 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 back up, so most hosting companies tin can aid you gear up this issue quickly.

Tinkering with your server or site configuration files can always be a challenge. Hence, we always recommend you lot endeavour this method first.

If you're hosting your site with Kinsta, our knowledgeable support team is but a click away and available 24/7. To get 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 accept representatives to aid you in many languages, including English, Castilian, French, German, Italian, and Portuguese.

Increase the Max Upload File Size in WordPress Multisite

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

First, caput to your Network Admin dashboard, and then go to Settings > Network Settings screen. Here, roll down till you find the Upload Settings section. You'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 (~1.v MB). You lot can change this to a higher value and click the Salve Changes button.

Notation: Yous cannot circumvent the server-level max upload size limit from here. If the limit you set here is college than the server'southward max upload size limit, the server will ignore it. Y'all can use the methods described to a higher place to observe your webserver's configuration.

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

Hither, 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. Nevertheless, it's disabled past default.

Update Your '.htaccess' File

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

Equally per PHP documentation, 3 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 y'all modified these three directives' values to admit your file sizes. For case, 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'south how PHP handles its directives.

Uploads can contain extra information in add-on to the file itself. So, giving all other upload-related directives some breathing space is a skilful idea. Yous can read our in-depth tutorial on how to improve PHP retention limit in WordPress for more data.

Admission 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 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 tin notice 2 other PHP directives in the above code: max_execution_time and max_input_time . They ascertain how long a server spends on a unmarried PHP task. The bigger your uploads, the bigger the fourth dimension spent will be. You demand to gear up their values to a number that's appropriate for your use case.

Note: You lot may get a 500 Internal Server Error after using the method above. Most probable, it's considering your server is running PHP in CGI mode. In such cases, you lot cannot employ the above 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, information technology contains directives that ascertain file timeouts, max upload size, and resource limits.

Using SSH or FTP, yous tin can find the php.ini file in your WordPress root directory. In some cases, you may not locate it in that location. Fret not! You can create a new file with the same proper 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 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 subsequently making the changes. Some hosts don't allow yous to modify PHP settings via this method. In such a case, you can proceed to try the following solution instead.

Subscribe Now

Create or Change 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 discover the .user.ini in your site's root directory. If yous tin'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.

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

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

You'll notice that it'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 yous manage your server and site configuration, you can change 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 lot tin alter your server's electric 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 downward here to modify the values of PHP directives such equally upload_max_filesize , post_max_size , memory_limit , max_execution_time , and max_input_time . The max values you can set here depend on your electric current hosting plan.

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

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

Increase the Max Upload File Size in Nginx

Nginx is another webserver like Apache, but it's also a lot more than. 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 old file before. The latter ane is chosen an Nginx config file.

On an Nginx server, y'all can find the php.ini file at /etc/php/7.iv/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 lot don't have to set the memory_limit in the above file as Nginx handles it differently. For more than, you can check out this Stack Overflow thread. Afterward saving your php.ini file, enable the changes by restarting PHP-FPM using the below code in your terminal:

          sudo service php7.four-fpm restart        

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

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

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

Setting it in the http block will impact 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 past this server.

          server {     ...     client_max_body_size 128M; }        

The location cake only affects the specified directory (e.g. 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 do that, you can utilize the following command in your terminal:

          sudo service nginx reload        

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

Use 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 allowed, similar 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 non-administrators. * * @param string $size Upload size limit (in bytes). * @render int (maybe) Filtered size limit. */ function filter_site_upload_size_limit( $size ) { // Fix the upload size limit to 10 MB for users lacking the 'manage_options' adequacy. if ( ! current_user_can( 'manage_options' ) ) { // 10 MB. $size = 1024 * 10000; } render $size; } add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', xx );        

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

Utilise a WordPress Plugin

Messing with lawmaking using SSH or FTP/SFTP is non for everyone. If you're non comfy with writing or editing code, you tin can employ 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'southward the just upwardly-to-date plugin on the WordPress plugin repository that helps you become 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 past both your hosting provider and WordPress.

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

Here, yous can meet that the maximum upload file size set past WordPress is lesser than that prepare by your hosting provider. Hence, y'all can creepo it upwardly by choosing the Maximum Upload File Size with the dropdown presented.

Note: If you desire to prepare a max upload file size limit that'southward larger than the one prepare by your hosting provider, information technology'south not possible to practice it via this plugin. For that, you need to contact your hosting provider.

Upload Files via FTP/SFTP

Are you still struggling with all the above methods? Or with your hosting provider to have them raise the upload file size limit? Y'all 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 yous have a lot of large files to upload, this is the fastest method. You tin can read our in-depth tutorial on how to majority 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 utilise the complimentary Add From Server plugin to import the uploaded files into WordPress.

Alternatively, you lot tin can do the same direct from the command line past 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 piece of work anymore. We're calculation it hither because nosotros'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'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 lot'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 considering you can only use the ini_set() office to set PHP directives that belong to the PHP_INI_ALL changeable manner.

As upload_max_size and post_max_size vest to the PHP_INI_PERDIR changeable manner. Y'all can just set them via php.ini, .htaccess, http.conf, or .user.ini.

If you've tried this method before without seeing whatever results, at present you know why information technology fails.

Verify Your WordPress Site'south 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 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, it has changed. That'due south a success!

You lot can besides go 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 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 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, information technology's but a matter of knowing where to expect for and what commands or tools to utilize.

In well-nigh cases, reaching out to your hosting provider should be enough. However, if you're stuck with a troublesome host, we've shown you some alternative methods yous can try before migrating to improve hosting.

Get uploading!

Did we comprehend it all? If you lot've experienced a stubborn example of upload file size limits, let us know how y'all managed to gear up it.


Save time, costs and maximize site operation with:

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

All of that and much more, in one plan with no long-term contracts, assisted migrations, and a 30-day-money-dorsum-guarantee. Cheque out our plans or talk to sales to observe the programme that'southward right for you.