Web Development February 25, 2021
“The file exceeds the upload limit for this website.” If this error message appears, then the WordPress upload limit is not high enough. The problem usually occurs with larger files. In this article, we show how to increase the upload limit and how to fix the error.
The error message shown in the screenshot below simply means that the requested file is too large. Of course, this can not only be the case with videos, but also with other media. Here you come across the so-called WordPress upload limit.
Why is there a WordPress upload limit?
Despite its name, the upload limit does not come from WordPress itself, but from the server used. The WordPress upload limit serves as a security measure for the server and prevents uploading of large files without authorized access. The upload limit is often set to a maximum of 10 MB. Uploading a video, an audio file or a large PDF file is then already a problem.
Where can I find the current upload limit?
Usually, the original upload limit on WordPress is around 2 MB. Of course, that doesn’t get you very far these days. The limit can therefore be increased using several methods. To see where the upload limit of a WordPress site currently is, just click on “Media” in the left toolbar in the backend. If you now click on Add file, the current limit is shown below.
Increase the WordPress upload limit
Of course, you now have the option of compressing the desired file. However, since the quality often suffers here, this method does not prove to be a useful solution. After all, the problem should be fixed and not bypassed. With 5 different methods, however, it is possible to increase the WordPress upload limit so that the file can be uploaded regardless of its size.
We recommend backing up the WordPress installation before making any changes. Especially when you don’t know exactly what you’re actually doing.
1st possibility: Increase through wp-config.php
The first way is by editing the wp-config.php file. When installing WordPress, this file is created automatically and is located in the root directory. This can be accessed via FTP access.
By the way: All the essential details for configuring WordPress are stored in wp-config.php — the name of this file already suggests this.
Now all you have to do is insert the following code, which increases the WordPress upload limit to 200 MB. The number can of course be adjusted as desired.
2nd possibility: Increase through .htaccess
The second option also requires access to the WordPress main directory. This works again via FTP access, where the .htaccess file can also be found. By inserting the following code, the WordPress upload limit can be increased to 200 MB (or whatever) in this way.
3rd possibility: Increase through cPanel
When working with cPanel, the PHP options can easily be adjusted. By clicking on “Choose PHP version” and then choosing “Options”.
The values can be adjusted here as desired.
4th possibility: Increase through php.ini
How the server used is configured can be found in the php.ini file. FTP or SSH takes you to the root directory where the file can be found. If there is no php.ini file, one can be created. However, access to this file is often restricted by the servers themselves, which is particularly common with shared hosting.
If the file already exists, desired values can be easily adjusted. If the file is first created, then the following code just needs to be pasted in.
5th possibility: increase with multisites
If a WordPress multisite is used, the upload limit can be easily set in the backend. Of course, the server configuration also plays a role here. So if the server locks at 20 MB, you can’t just crank it up to 200 MB in the MultiSite either.
To do this, click on Settings in the left-hand toolbar within the network administration. If you click on the network settings again, the file size can now be adjusted. The size is specified here in KB, which is why 204800 KB must be entered for 200 MB, for example.
This value can easily be calculated using the following formula: x MB * 1024.
No chance? Increase by hoster support
This option is particularly suitable for those who are not familiar with WordPress, as it is extremely simple. With the other options it goes a little faster.
With this option, only the support of the responsible hoster has to be called or written to. A short request with the desired increase in the upload limit is enough and the problem will solve itself.
Increase WordPress Upload Limit — Conclusion
Even if the limit can be increased using various means, the limit should not be increased unnecessarily beyond the required value. After all, the limitation of the server makes sense in terms of security and efficiency. 200 MB is fine for most WordPress sites.
In addition, it should always be considered when a large file is really necessary and when not. If too many large images and videos are stored on the server, performance also suffers. This in turn results in limited website speed and longer loading times. Sometimes less is more!
Do you need a WordPress agency? We are available as your experts. Get in touch with us and arrange a non-binding consultation.