If you’ve ever tried uploading a large file to WordPress and encountered an error due to the upload file size limit, don’t worry—you’re not alone. Many hosting providers set default upload size limits that might be too low for your needs. Fortunately, there are multiple ways to increase the maximum upload file size in WordPress. In this guide, we’ll explore various methods to achieve this.
Table Of Contents
Check Your Current Upload Limit
Before making changes, check your current file upload limit. You can do this by navigating to Media > Add New in your WordPress dashboard. The current upload limit will be displayed on the page.
Change Your Hosting Max Upload File Size Limit
Check your hosting management panel (cPanel, DirectAdmin, Plesk, etc.) for PHP settings. Look for PHP Settings or PHP INI Editor. In some environments, these options are found under Select PHP Version. In cPanel, you’ll find them specifically in the PHP INI Editor
Or Select PHP Version Section
in Direct admin it’s located under PHP Selector Section
If you can’t find the settings, contact your hosting provider for assistance in making the change.
Which options should you change to increase the upload limit?
post_max_size
upload_max_filesize
set the values to desired options and save the setting.
This will resolve the issue 99% of the time, and you can check the new file size in Media > Add New.
Modify the .htaccess
File
in the Previous Section if you done anything, you shouldn’t have any problems, but if problem persists, do the following too.
If your server uses Apache, you can increase the upload size limit by adding the following lines to your .htaccess
file, this file located in your website root directory (public_html in most cases) :
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
Save the changes and check if the new limit has been applied.
Update the php.ini
File
If you have access to your server’s php.ini
file, locate it and update or add the following lines:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
Restart your server if necessary for the changes to take effect.
Modify wp-config.php
You can also modify your WordPress configuration file by adding the following lines to wp-config.php
:
@ini_set('upload_max_filesize', '64M');
@ini_set('post_max_size', '64M');
@ini_set('max_execution_time', '300');
Use a Plugin
If you’re not comfortable editing code, you can use a plugin like Increase Maximum Upload File Size or WP Maximum Upload File Size. These plugins allow you to adjust the limits directly from the WordPress admin panel.
Contact Your Hosting Provider
Some hosting providers impose strict limits that cannot be changed manually. If none of the above methods work, reach out to your hosting provider and request an increase in the upload limit.
Conclusion
Increasing the maximum upload file size in WordPress is a straightforward process. Whether you choose to modify server settings, use a plugin, or contact your hosting provider, there’s always a solution that fits your setup. By following the methods outlined in this guide, you can easily adjust your WordPress site to accommodate larger file uploads.