Is This Application Server Upload Limited
A low WordPress upload size limit stops you from uploading large files, plugins, and themes. If yous're building a media-heavy website, that can 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 become most solving this upshot. We'll cover them all in this commodity and show yous how to increase the maximum upload size in WordPress quickly.
Let'southward dive in!
Adopt 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'southward resources. To preclude users from causing server timeouts, the default maximum upload size in WordPress typically ranges from 4 MB to 128 MB. Unremarkably, 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 near cases.
To verify this, go to your WordPress site'southward Media Library. Hither, effort to upload a file that crosses this maximum upload file size limit. You lot'll see an error message that looks something similar this:

The "exceeds the maximum upload size for this site" mistake tin exist frustrating, but it exists for two main reasons: security and efficiency. It hinders site owners and other users, including malicious actors, from uploading huge files (eastward.g. loftier-resolution images, large videos).
Otherwise, it tin can result in incapacitating your website'southward server, making your site come up to a crawl. Or worse, information technology can bring your site down altogether!
How to Check the Current Maximum Upload Size in WordPress
There are many ways to check your WordPress site'due south electric current max upload size. Allow's go through all of them.
In the Media Library
The quickest style to bank check your site'southward current maximum upload size is to become to your WordPress dashboard, and from in that location, go to Media > Library. Hither, click on the Add New button to activate the media uploader tool.

As Kinsta hosts this site, the Maximum upload file size: 128 MB.
message displays below the Select Files push button. If you're using a different web hosting provider, you lot may see a different limit listed here.
You can also become to Media > Add together New directly and see the same bulletin displayed at the bottom.

Once again, you can see the 128 MB max upload file size here.
In the Site Health Info
WordPress 5.two added the Site Health Info tool to help you debug your WordPress site better. Here, you can detect almost all the information about your server and WordPress configuration.
Every bit both the server and WordPress handle the max upload file size, at that place are two ways to find its value on this screen.
First, you tin can find it listed under the Media Handling dropdown. Here, wait for the value of Max size of an uploaded file
constant.

The second method is to wait nether the Server dropdown. Yous'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.

Yous can likewise run into other PHP constants and their values, such as:
-
PHP mail service max size
: Defines the maximum upload limit for Postal service requests. -
PHP memory limit
: Defines the memory allocated for PHP. It should be set equal to or higher than theUpload max filesize
limit. Or else the upload will fail.
Your spider web host sets these options. Usually, starter hosting plans will take a lesser upload size limit than enterprise hosting plans. Some hosts may allow you to override these limits. Merely in most cases, y'all may need your hosting provider'due south assistance (and maybe a program upgrade) to increase them.
Why Increase the Maximum Upload File Size in WordPress?
There are many reasons why you may need to increase your WordPress site's maximum upload file size. Hither are the most mutual ones:
- You want to install a large theme or plugin straight through the WordPress admin dashboard.
- Updating your WordPress site regularly is a great way to keep your readers engaged and render for more. And that includes uploading new images, videos, audios, and other media regularly. However, that'south not e'er feasible when in that location's a file size limit for your uploads.
- Y'all want to upload a large video or image as your site's background or header.
- You program to sell digital files such equally ebooks, photographs, videos, themes, and plugins directly from your site. Sometimes, these files can sew together to hundreds of megabytes (or more).
At present that we've covered the basics of max upload file size in WordPress, let'south larn how to increase it.
x Means to Increase the Max Upload File Size in WordPress
There are many ways you lot tin gear up the WordPress maximum upload size issue. We'll start with the easiest ones outset, and and so we'll move on to the intermediate-level tutorials.
Contact Your Hosting Provider for Assist
If you're facing issues 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 petty task for tech support, so most hosting companies can help you prepare this issue apace.
Tinkering with your server or site configuration files can always exist a challenge. Hence, we always recommend you try this method offset.
If you're hosting your site with Kinsta, our knowledgeable support team is only a click away and bachelor 24/vii. To go started, go to your MyKinsta dashboard and click the chat icon in the bottom correct corner.

We have representatives to assist yous in many languages, including English, Spanish, French, German, Italian, and Portuguese.
Increment the Max Upload File Size in WordPress Multisite
If yous'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 then go to Settings > Network Settings screen. Here, roll down till you lot find the Upload Settings section. You'll discover the Max upload file size
field in this area.

The default value of Max upload file size in a WordPress Multisite is 1500 KB (~1.5 MB). Yous can change this to a college value and click the Save Changes button.
Notation: You lot cannot circumvent the server-level max upload size limit from here. If the limit you set hither is college than the server's max upload size limit, the server volition ignore it. You can use the methods described to a higher place to find your webserver'south configuration.

Here, we've set the new max upload file size to 131072 KB (~128 MB).
Y'all can besides limit the total size of files uploaded to an individual site in the Multisite network. However, information technology'southward disabled past 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 can find your .htaccess file in the WordPress site's root directory.
Every bit 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 department above. It would help if you modified these three directives' values to admit your file sizes. For instance, if the largest file y'all'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'southward how PHP handles its directives.
Uploads can incorporate extra information in add-on to the file itself. And so, giving all other upload-related directives some breathing space is a skillful thought. You can read our in-depth tutorial on how to better PHP memory limit in WordPress for more data.
Access your .htaccess file via FTP/SFTP or your hosting provider's File Manager.

Open the.htaccess file with a text editor or code editor, 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 tin can discover 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 unmarried PHP task. The bigger your uploads, the bigger the fourth dimension spent will be. You need to gear up their values to a number that's appropriate for your employ case.
Note: Yous may become a 500 Internal Server Error subsequently using the method to a higher place. Most likely, information technology'due south because your server is running PHP in CGI style. In such cases, you cannot use the higher up commands in your .htaccess file.
Create or Alter the 'php.ini' File
The php.ini file is where you ascertain 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 lot 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 same name in your site's root directory.

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 subsequently making the changes. Some hosts don't let you to modify PHP settings via this method. In such a case, you can continue to try the following solution instead.
Subscribe Now
Create or Modify the '.user.ini' File
If your hosting provider has locked downwards 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'south root directory. If you can't find it, so you can create a new .user.ini file in the aforementioned location. Follow the same 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 become started, go to your cPanel dashboard, and select the Select PHP Version under the Software section.

Here, you can change your server'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.

Curlicue 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 set hither depend on your current hosting program.

If y'all accept any doubts about these values, we suggest yous contact your hosting provider. The latest cPanel dashboard saves changes automatically, so yous don't take to click anything. Simply if y'all're using an older cPanel version, make sure to click the Salvage Changes button.
Increase the Max Upload File Size in Nginx
Nginx is another webserver similar Apache, only 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 lot're running your WordPress site on Nginx, y'all'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 find the php.ini file at /etc/php/vii.four/fpm/php.ini
. Depending on which PHP version y'all've installed, the exact path may vary slightly.
upload_max_filesize = 64M post_max_size = 128M
You don't have to ready the memory_limit
in the in a higher place file equally Nginx handles it differently. For more, you can check out this Stack Overflow thread. Later on saving your php.ini file, enable the changes past restarting PHP-FPM using the beneath lawmaking in your terminal:
sudo service php7.4-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. You need to declare this directive in the nginx.conf file, which you tin can discover at /etc/nginx/nginx.conf
.
You lot can declare this directive within 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 information technology in the server block volition merely affect a specific site/app hosted by this server.
server { ... client_max_body_size 128M; }
The location block only affects the specified directory (e.g. files, uploads) within 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 employ the following control in your terminal:
sudo service nginx reload
If you're a Kinsta client, yous can't admission your Nginx config directly. However, you can reach out to our support team, and they tin quickly make the changes for you.
Use the WordPress 'upload_size_limit' Filter
WordPress 2.5 introduced the upload_size_limit filter, which filters the maximum upload size immune in php.ini. Even WordPress uses this filter to show you the max upload size allowed, similar in the Media Library and Site Health Info screens.
Below is an example of this filter in activeness 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 (maybe) Filtered size limit. */ function filter_site_upload_size_limit( $size ) { // Ready 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; } return $size; } add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', twenty );
The to a higher place code uses WordPress' manage_options
capability to set this limit only for not-admins. Yous 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 code using SSH or FTP/SFTP is non for everyone. If you lot're not comfy with writing or editing code, you can use a WordPress plugin instead.

We'll be using the WP Maximum Upload File Size plugin hither. As of writing this, information technology's the merely up-to-date plugin on the WordPress plugin repository that helps you lot get this done.
To go started, install and activate the WP Maximum Upload File Size plugin. Next, become to its settings screen in your WordPress dashboard. Hither, you can see the maximum upload file size set by both your hosting provider and WordPress.

Here, you tin come across that the maximum upload file size set by WordPress is bottom than that set past your hosting provider. Hence, you can crank it up by choosing the Maximum Upload File Size with the dropdown presented.
Note: If yous want to set a max upload file size limit that'due south larger than the one set by your hosting provider, it'south not possible to do it via this plugin. For that, you need to contact your hosting provider.
Upload Files via FTP/SFTP
Are y'all nevertheless struggling with all the higher up methods? Or with your hosting provider to accept them raise the upload file size limit? You can always upload large files via FTP/SFTP.

If yous accept 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 case, you tin can employ the free Add together From Server plugin to import the uploaded files into WordPress.
Alternatively, you tin practise the same direct 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 work anymore. Nosotros're adding it hither because we've plant many spider web tutorials that list information technology as a legitimate way to increment the max upload size in WordPress.
It involves going to your site's root directory via FTP/SFTP or SSH and so editing 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 work because you tin simply use the ini_set() function to set PHP directives that belong to the PHP_INI_ALL changeable manner.
As upload_max_size
and post_max_size
belong to the PHP_INI_PERDIR changeable manner. Y'all tin can only prepare them via php.ini, .htaccess, http.conf, or .user.ini.
If you've tried this method before without seeing any results, now yous know why information technology fails.
Verify Your WordPress Site's New Max Upload File Size
Finally, information technology'southward 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 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.

Yes, it has inverse. That's a success!
Y'all tin likewise become to the Site Health Info panel and check for the same nether Media Handling and Server dropdowns.


Summary
As you lot've seen, increasing the maximum upload file size in WordPress isn't also circuitous. Whether you lot're building a media-heavy portfolio site or installing a large theme, it'southward but a thing of knowing where to look for and what commands or tools to utilize.
In about cases, reaching out to your hosting provider should be enough. Even so, if you're stuck with a troublesome host, we've shown you some alternative methods you can try before migrating to better hosting.
Get uploading!
Did we cover it all? If you've experienced a stubborn case of upload file size limits, let us know how you lot managed to ready it.
Save 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 one plan with no long-term contracts, assisted migrations, and a 30-day-money-back-guarantee. Check out our plans or talk to sales to detect the plan that's right for you.
Source: https://kinsta.com/blog/increase-max-upload-size-wordpress/
Post a Comment for "Is This Application Server Upload Limited"