Max File Size Upload Limit Ftp Wordpress
A low WordPress upload size limit stops you from uploading large files, plugins, and themes. If you're building a media-heavy website, that can be a considerable obstruction. Information technology'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, at that place are many ways to go well-nigh solving this issue. We'll cover them all in this article and prove you how to increase the maximum upload size in WordPress apace.
Let's dive 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'southward resource. To forbid users from causing server timeouts, the default maximum upload size in WordPress typically ranges from four MB to 128 MB. Usually, the hosting provider sets this limit at the server level.
WordPress also includes constants that ascertain this limit, simply they cannot override the server-level settings in most cases.
To verify this, become to your WordPress site's Media Library. Here, try to upload a file that crosses this maximum upload file size limit. You'll see an mistake bulletin that looks something like this:

The "exceeds the maximum upload size for this site" error tin exist frustrating, but it exists for two master 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 to a crawl. Or worse, it can bring your site down altogether!
How to Cheque the Electric current Maximum Upload Size in WordPress
There are many ways to check your WordPress site's current max upload size. Allow'due south go through all of them.
In the Media Library
The quickest way to cheque your site's current maximum upload size is to become to your WordPress dashboard, and from there, get to Media > Library. Here, click on the Add New button to activate the media uploader tool.

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

Again, you tin see the 128 MB max upload file size here.
In the Site Health Info
WordPress five.two added the Site Wellness Info tool to assistance you lot debug your WordPress site better. Here, you can find almost all the information about your server and WordPress configuration.
Every bit both the server and WordPress handle the max upload file size, there are two ways to detect its value on this screen.
First, yous can observe it listed under the Media Handling dropdown. Here, look for the value of Max size of an uploaded file
constant.

The second method is to expect nether the Server dropdown. You'll observe many options related to your webserver'due south setup nether here. Please search for the value for Upload max filesize
constant to see what information technology is. On this site, the max upload file size limit is 128 MB.

You lot can also see other PHP constants and their values, such equally:
-
PHP mail max size
: Defines the maximum upload limit for Mail service requests. -
PHP memory limit
: Defines the memory allocated for PHP. It should exist set equal to or higher than theUpload 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 let y'all to override these limits. But in virtually cases, you may demand your hosting provider's assistance (and perhaps a program upgrade) to increase them.
Why Increase the Maximum Upload File Size in WordPress?
There are many reasons why you may demand to increment your WordPress site's maximum upload file size. Here are the most common 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 proceed your readers engaged and return for more than. And that includes uploading new images, videos, audios, and other media regularly. However, that's not always feasible when there'due south a file size limit for your uploads.
- You want to upload a large video or paradigm as your site's groundwork or header.
- Yous plan to sell digital files such as ebooks, photographs, videos, themes, and plugins directly from your site. Sometimes, these files tin sew to hundreds of megabytes (or more).
Now that we've covered the basics of max upload file size in WordPress, let'southward acquire how to increase it.
x Ways to Increase the Max Upload File Size in WordPress
There are many means y'all can ready the WordPress maximum upload size result. We'll starting time with the easiest ones first, and then we'll movement 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 trivial task for tech support, and so virtually hosting companies can help you set up this consequence quickly.
Tinkering with your server or site configuration files can always be a challenge. Hence, we always recommend you try this method first.
If you're hosting your site with Kinsta, our knowledgeable back up team is just a click away and available 24/vii. To get started, become to your MyKinsta dashboard and click the chat icon in the bottom right corner.

We have representatives to help yous in many languages, including English language, Castilian, French, German language, Italian, and Portuguese.
Increase the Max Upload File Size in WordPress Multisite
If you're running a WordPress Multisite network, then y'all can change the max upload file size for your network.
First, head to your Network Admin dashboard, and then go to Settings > Network Settings screen. Here, scroll down till yous notice the Upload Settings section. You'll find 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). You lot can modify this to a college value and click the Save Changes button.
Note: You cannot circumvent the server-level max upload size limit from here. If the limit you set up here is college than the server's max upload size limit, the server volition ignore it. You can employ the methods described in a higher place to notice your webserver'south configuration.

Here, we've set the new max upload file size to 131072 KB (~128 MB).
You lot tin can too limit the total size of files uploaded to an individual site in the Multisite network. Notwithstanding, it's 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 can observe 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 higher up. It would help 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, we recommend the following settings:
-
upload_max_filesize = 32M
-
post_max_size = 64M
-
memory_limit = 128M
Notice, all the values use G instead of MB. That'southward how PHP handles its directives.
Uploads can contain extra information in add-on to the file itself. And so, giving all other upload-related directives some breathing space is a good idea. Yous can read our in-depth tutorial on how to improve PHP retentivity limit in WordPress for more data.
Admission your .htaccess file via FTP/SFTP or your hosting provider'southward File Manager.

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
Yous tin detect two 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 task. The bigger your uploads, the bigger the time spent will be. You need to set their values to a number that's advisable for your use example.
Annotation: You lot may get a 500 Internal Server Error after using the method above. Almost likely, it's considering your server is running PHP in CGI style. In such cases, you cannot utilise the higher up commands in your .htaccess file.
Create or Modify the 'php.ini' File
The php.ini file is where y'all 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 tin can find the php.ini file in your WordPress root directory. In some cases, you may not locate information technology 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 the post-obit 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 later making the changes. Some hosts don't allow you to modify PHP settings via this method. In such a case, you lot 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.
Similar php.ini and .htaccess files, you can discover the .user.ini in your site's root directory. If you can't observe 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.
Side by side, 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 echo 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, you can modify 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 department.

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

Scroll downwardly here to modify the values of PHP directives such every bit upload_max_filesize
, post_max_size
, memory_limit
, max_execution_time
, and max_input_time
. The max values y'all can set here depend on your current hosting plan.

If you have whatsoever doubts about these values, we propose y'all contact your hosting provider. The latest cPanel dashboard saves changes automatically, so you don't have to click anything. But if you're using an older cPanel version, make sure to click the Save Changes push button.
Increment the Max Upload File Size in Nginx
Nginx is another webserver like Apache, but information technology's also 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, you lot'll demand to change both your php.ini and nginx.conf files. We've dealt with the sometime file before. The latter ane is called an Nginx config file.
On an Nginx server, you can find the php.ini file at /etc/php/seven.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 ready the memory_limit
in the above file equally Nginx handles information technology differently. For more than, you can cheque out this Stack Overflow thread. Subsequently 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 lawmaking 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 observe at /etc/nginx/nginx.conf
.
Yous can declare this directive inside the http {...}
block, the server {...}
cake, 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 cake will only affect a specific site/app hosted past 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 save the file and restart Nginx to apply the changes. To do that, y'all can employ the following control in your terminal:
sudo service nginx reload
If you're a Kinsta client, you can't access your Nginx config direct. However, yous can reach out to our support team, and they can quickly brand the changes for you.
Utilise the WordPress 'upload_size_limit' Filter
WordPress ii.5 introduced the upload_size_limit filter, which filters the maximum upload size immune in php.ini. Even WordPress uses this filter to show y'all the max upload size immune, like in the Media Library and Site Health Info screens.
Below 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 cord $size Upload size limit (in bytes). * @return int (maybe) Filtered size limit. */ office filter_site_upload_size_limit( $size ) { // Set the upload size limit to ten 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 code uses WordPress' manage_options
adequacy to fix this limit just for non-admins. You can modify the code to target specific user roles or user ids. Read our in-depth WordPress roles and capabilities article for more information.
Utilise a WordPress Plugin
Messing with code using SSH or FTP/SFTP is not for everyone. If you're not comfortable with writing or editing code, you can utilize a WordPress plugin instead.

Nosotros'll be using the WP Maximum Upload File Size plugin here. Equally of writing this, information technology'due south the just upwards-to-date plugin on the WordPress plugin repository that helps yous get this done.
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 can see the maximum upload file size set by both your hosting provider and WordPress.

Here, y'all can come across that the maximum upload file size ready by WordPress is bottom than that set past your hosting provider. Hence, you tin crank it up 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 set by your hosting provider, it'due south not possible to do it via this plugin. For that, you 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 raise the upload file size limit? You can ever upload large files via FTP/SFTP.

If you take a lot of large files to upload, this is the fastest method. Y'all tin 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'due south the example, yous can use the free Add together From Server plugin to import the uploaded files into WordPress.
Alternatively, you can exercise the same straight from the control line by 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 we've found many spider web tutorials that list information technology as a legitimate mode 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.

You'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 y'all can only utilize the ini_set() function to set PHP directives that belong to the PHP_INI_ALL changeable mode.
As upload_max_size
and post_max_size
vest to the PHP_INI_PERDIR changeable way. Yous can only gear up them via php.ini, .htaccess, http.conf, or .user.ini.
If you've tried this method before without seeing whatever results, now yous know why it fails.
Verify Your WordPress Site's New Max Upload File Size
Finally, it'southward time to verify whether the new max upload file size limit is implemented in your WordPress site. To exercise 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 bank check whether the max upload file size limit has changed.

Yes, it has changed. That's a success!
You tin can also get to the Site Health Info panel and check for the same under Media Handling and Server dropdowns.


Summary
As you lot've seen, increasing the maximum upload file size in WordPress isn't besides circuitous. Whether you're building a media-heavy portfolio site or installing a large theme, it'southward just a matter of knowing where to look for and what commands or tools to employ.
In virtually cases, reaching out to your hosting provider should be plenty. However, if you're stuck with a troublesome host, we've shown you some culling methods you tin endeavor before migrating to better hosting.
Become uploading!
Did we embrace information technology all? If you've experienced a stubborn case of upload file size limits, let us know how you managed to fix it.
Salve 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 congenital-in Awarding Performance Monitoring.
All of that and much more, in one plan with no long-term contracts, assisted migrations, and a thirty-mean solar day-coin-back-guarantee. Check out our plans or talk to sales to find the plan that's right for you.
Source: https://kinsta.com/blog/increase-max-upload-size-wordpress/
0 Response to "Max File Size Upload Limit Ftp Wordpress"
Post a Comment