How to Increase the WordPress Max Upload Size

Beautiful, high-resolution graphics, videos, and other large files can help your site stand out from the crowd. Unfortunately, your hosting provider may have other ideas!

From time-to-time, you may encounter the following error when attempting to upload a file in WordPress: Filename exceeds the maximum upload size for this site.

Weightier files do consume a lot of resources, which can slow down your website. However, sometimes you may have a good reason pushing the limits. There are also lots of tricks for delivering heavy files without bringing your site to a grinding halt, including caching and Content Delivery Networks (CDNs).

If you’ve weighed up the pros and cons and still want to upload a chunkier file, then it is possible to increase the WordPress maximum upload size.

In this post, we’ll share four different ways to lift this limit, including a way to make this server-level change without having to write a single line of code.

How to Check Your Current Maximum Upload Limit

Before boosting your maximum upload size, you may want to double-check your current limits. In your WordPress dashboard, navigate to Media > Add New. Here, you’ll find your site’s current maximum upload size, just below the Drop files here section.WordPress' current image upload limit. WordPress' current image upload limit. WordPress' current image upload limit.

If you’re still feeling restricted, then there are several ways to lift this limit. The solution that works for you may vary, depending on your hosting provider and how your site is set up. However, with four different methods at your disposal, you should have no problems finding at least one that works for your particular website.

1. Edit the functions.php File

You can increase the maximum file limit by adding some code to your theme’s functions.php file. Editing your site at the code level can be a daunting prospect and always carries a certain degree of risk. With this in mind, you may want to create a backup before proceeding, using a plugin such as UpdraftPlus. This ensures that you have something to restore, in the unlikely event that you encounter a problem.

When you’re ready to edit the functions.php file, navigate to Appearance > Theme Editor. Then, open the Select theme to edit dropdown, and choose your current WordPress theme.Editing WordPress' function.php file.Editing WordPress' function.php file.Editing WordPress' function.php file.

In the left-hand menu, select the functions.php file. You can then add the following code, making sure to replace the values with your desired maximum upload size:

The max_execution_time is the maximum amount of time that WordPress will spend processing a single script. This can prevent malicious third-parties from burning through your server’s resources by executing never-ending code.

If you want to upload large files, then you may need to increase this limit. However, it’s important not to get carried away–this restriction is designed to help protect your site against server abuse.

Meanwhile, upload_max_size is the maximum size of a single uploaded file. This is the main value that you’ll want to increase. However, don’t overlook post_max_size. This is the limit of the entire body of the request, which may include multiple files. If you’re planning to upload heftier files, then your post_max_size should be significantly larger than your upload_max_size.

Don’t forget to save your changes before exiting this file! Now, you should have no issues uploading bigger files.

If you do use this method, then just be aware that this change is tied into your WordPress theme. If you switch to a new theme, then your maximum upload size will return to WordPress’ defaults. You’ll need to repeat these steps, in order to increase the limit for your new theme.

2. Update Your .htaccess File

Depending on your website’s configuration, you may be able to increase the maximum upload size by adding some code to your .htaccess file. This is a configuration file used by Apache-based servers.

To access .htaccess, you’ll need to connect to your server using a File Transfer Protocol (FTP) client, such as FileZilla. After connecting to your server, navigate to your site’s /public_html directory. Here, you should find the .htaccess file.Accessing your site's .htaccess file, using the FileZilla FTP client.Accessing your site's .htaccess file, using the FileZilla FTP client.Accessing your site's .htaccess file, using the FileZilla FTP client.

You can now right-click this file and select View/Edit. At this point, you can open .htaccess using either a text or code editor. Then, add the following lines:

Make sure to replace the values with your desired maximum upload size, and execution time. You can now save your changes, and check whether this has solved your problem.

3. Edit Your wp-config.php File

You may be able to increase the WordPress maximum upload size by editing your wp-config.php file. Once again, this requires you to connect to your site using an FTP client.

After making this connection, navigate to your WordPress root directory. In this folder, locate your wp-config.php file and open it for editing.Accessing your WordPress site's Wp-config.php file, using the File Transfer Protocol. Accessing your WordPress site's Wp-config.php file, using the File Transfer Protocol. Accessing your WordPress site's Wp-config.php file, using the File Transfer Protocol.

You can now add the following lines:

As always, make sure to replace the maximum upload size, post maximum size, and memory limit with your own values. Then, simply save your changes. The Filename exceeds the maximum upload size error should now be a distant memory. 

4. Use a Plugin

Not everyone feels comfortable editing their site at the code level. The good news is that there’s a WordPress plugin to help you accomplish practically any task, including changing the maximum upload size.

You can lift this limit using the aptly-named Increase Maximum Upload File Size. After activating this plugin you can check your restrictions at any point, by navigating to Tools > Increase Maximum Upload File Size. This screen displays the limit set by your hosting provider, and the limit set by WordPress.The Increase Maximum Upload File Size WordPress plugin.The Increase Maximum Upload File Size WordPress plugin.The Increase Maximum Upload File Size WordPress plugin.

To smash through these restrictions, open the Choose Maximum Upload File Size dropdown.Changing the file upload limit, using a WordPress plugin.Changing the file upload limit, using a WordPress plugin.Changing the file upload limit, using a WordPress plugin.

The available options range from 16MB-1GB. After making your selection, click on Save Changes. You’re now free to upload larger files to your WordPress website!

Conclusion

In this article, I covered four ways to increase the WordPress maximum upload size. While there’s no guarantee that every method will work with your website and hosting provider, there should be something in this tutorial for everyone.

Just be cautious about getting carried away and uploading huge files to your WordPress account. Even if you follow performance best practices, massive files can impact your page loading times, which is bad news for the visitor experience.

Beautiful, high-resolution graphics, videos, and other large files can help your site stand out from the crowd. Unfortunately, your hosting provider may have other ideas!

From time-to-time, you may encounter the following error when attempting to upload a file in WordPress: Filename exceeds the maximum upload size for this site.

Weightier files do consume a lot of resources, which can slow down your website. However, sometimes you may have a good reason pushing the limits. There are also lots of tricks for delivering heavy files without bringing your site to a grinding halt, including caching and Content Delivery Networks (CDNs).

If you’ve weighed up the pros and cons and still want to upload a chunkier file, then it is possible to increase the WordPress maximum upload size.

In this post, we’ll share four different ways to lift this limit, including a way to make this server-level change without having to write a single line of code.

How to Check Your Current Maximum Upload Limit

Before boosting your maximum upload size, you may want to double-check your current limits. In your WordPress dashboard, navigate to Media > Add New. Here, you’ll find your site’s current maximum upload size, just below the Drop files here section.WordPress' current image upload limit. WordPress' current image upload limit. WordPress' current image upload limit.

If you’re still feeling restricted, then there are several ways to lift this limit. The solution that works for you may vary, depending on your hosting provider and how your site is set up. However, with four different methods at your disposal, you should have no problems finding at least one that works for your particular website.

1. Edit the functions.php File

You can increase the maximum file limit by adding some code to your theme’s functions.php file. Editing your site at the code level can be a daunting prospect and always carries a certain degree of risk. With this in mind, you may want to create a backup before proceeding, using a plugin such as UpdraftPlus. This ensures that you have something to restore, in the unlikely event that you encounter a problem.

When you’re ready to edit the functions.php file, navigate to Appearance > Theme Editor. Then, open the Select theme to edit dropdown, and choose your current WordPress theme.Editing WordPress' function.php file.Editing WordPress' function.php file.Editing WordPress' function.php file.

In the left-hand menu, select the functions.php file. You can then add the following code, making sure to replace the values with your desired maximum upload size:

The max_execution_time is the maximum amount of time that WordPress will spend processing a single script. This can prevent malicious third-parties from burning through your server’s resources by executing never-ending code.

If you want to upload large files, then you may need to increase this limit. However, it’s important not to get carried away–this restriction is designed to help protect your site against server abuse.

Meanwhile, upload_max_size is the maximum size of a single uploaded file. This is the main value that you’ll want to increase. However, don’t overlook post_max_size. This is the limit of the entire body of the request, which may include multiple files. If you’re planning to upload heftier files, then your post_max_size should be significantly larger than your upload_max_size.

Don’t forget to save your changes before exiting this file! Now, you should have no issues uploading bigger files.

If you do use this method, then just be aware that this change is tied into your WordPress theme. If you switch to a new theme, then your maximum upload size will return to WordPress’ defaults. You’ll need to repeat these steps, in order to increase the limit for your new theme.

2. Update Your .htaccess File

Depending on your website’s configuration, you may be able to increase the maximum upload size by adding some code to your .htaccess file. This is a configuration file used by Apache-based servers.

To access .htaccess, you’ll need to connect to your server using a File Transfer Protocol (FTP) client, such as FileZilla. After connecting to your server, navigate to your site’s /public_html directory. Here, you should find the .htaccess file.Accessing your site's .htaccess file, using the FileZilla FTP client.Accessing your site's .htaccess file, using the FileZilla FTP client.Accessing your site's .htaccess file, using the FileZilla FTP client.

You can now right-click this file and select View/Edit. At this point, you can open .htaccess using either a text or code editor. Then, add the following lines:

Make sure to replace the values with your desired maximum upload size, and execution time. You can now save your changes, and check whether this has solved your problem.

3. Edit Your wp-config.php File

You may be able to increase the WordPress maximum upload size by editing your wp-config.php file. Once again, this requires you to connect to your site using an FTP client.

After making this connection, navigate to your WordPress root directory. In this folder, locate your wp-config.php file and open it for editing.Accessing your WordPress site's Wp-config.php file, using the File Transfer Protocol. Accessing your WordPress site's Wp-config.php file, using the File Transfer Protocol. Accessing your WordPress site's Wp-config.php file, using the File Transfer Protocol.

You can now add the following lines:

As always, make sure to replace the maximum upload size, post maximum size, and memory limit with your own values. Then, simply save your changes. The Filename exceeds the maximum upload size error should now be a distant memory. 

4. Use a Plugin

Not everyone feels comfortable editing their site at the code level. The good news is that there’s a WordPress plugin to help you accomplish practically any task, including changing the maximum upload size.

You can lift this limit using the aptly-named Increase Maximum Upload File Size. After activating this plugin you can check your restrictions at any point, by navigating to Tools > Increase Maximum Upload File Size. This screen displays the limit set by your hosting provider, and the limit set by WordPress.The Increase Maximum Upload File Size WordPress plugin.The Increase Maximum Upload File Size WordPress plugin.The Increase Maximum Upload File Size WordPress plugin.

To smash through these restrictions, open the Choose Maximum Upload File Size dropdown.Changing the file upload limit, using a WordPress plugin.Changing the file upload limit, using a WordPress plugin.Changing the file upload limit, using a WordPress plugin.

The available options range from 16MB-1GB. After making your selection, click on Save Changes. You’re now free to upload larger files to your WordPress website!

Conclusion

In this article, I covered four ways to increase the WordPress maximum upload size. While there’s no guarantee that every method will work with your website and hosting provider, there should be something in this tutorial for everyone.

Just be cautious about getting carried away and uploading huge files to your WordPress account. Even if you follow performance best practices, massive files can impact your page loading times, which is bad news for the visitor experience.


Print Share Comment Cite Upload Translate
APA
Jessica Thornsby | Sciencx (2024-03-29T07:35:26+00:00) » How to Increase the WordPress Max Upload Size. Retrieved from https://www.scien.cx/2021/11/19/how-to-increase-the-wordpress-max-upload-size/.
MLA
" » How to Increase the WordPress Max Upload Size." Jessica Thornsby | Sciencx - Friday November 19, 2021, https://www.scien.cx/2021/11/19/how-to-increase-the-wordpress-max-upload-size/
HARVARD
Jessica Thornsby | Sciencx Friday November 19, 2021 » How to Increase the WordPress Max Upload Size., viewed 2024-03-29T07:35:26+00:00,<https://www.scien.cx/2021/11/19/how-to-increase-the-wordpress-max-upload-size/>
VANCOUVER
Jessica Thornsby | Sciencx - » How to Increase the WordPress Max Upload Size. [Internet]. [Accessed 2024-03-29T07:35:26+00:00]. Available from: https://www.scien.cx/2021/11/19/how-to-increase-the-wordpress-max-upload-size/
CHICAGO
" » How to Increase the WordPress Max Upload Size." Jessica Thornsby | Sciencx - Accessed 2024-03-29T07:35:26+00:00. https://www.scien.cx/2021/11/19/how-to-increase-the-wordpress-max-upload-size/
IEEE
" » How to Increase the WordPress Max Upload Size." Jessica Thornsby | Sciencx [Online]. Available: https://www.scien.cx/2021/11/19/how-to-increase-the-wordpress-max-upload-size/. [Accessed: 2024-03-29T07:35:26+00:00]
rf:citation
» How to Increase the WordPress Max Upload Size | Jessica Thornsby | Sciencx | https://www.scien.cx/2021/11/19/how-to-increase-the-wordpress-max-upload-size/ | 2024-03-29T07:35:26+00:00
https://github.com/addpipe/simple-recorderjs-demo