How To Increase The Maximum File Upload Size In WordPress

Uploading large files to WordPress can be a hassle, especially if you’re trying to upload something that’s too big for the default file size limit. If you’ve ever run into this issue, you know how frustrating it can be. Luckily, there’s a way to increase the maximum file upload size in WordPress. With a few simple steps, you can make sure that you’ll never run into this problem again.

Why Increase the Maximum File Upload Size in WordPress?

Large file sizes can be a common problem when trying to upload images, videos, or other files to your WordPress site. The default maximum file upload size in WordPress is 2MB, which is usually not enough for most files. This means that people often need to increase their maximum file upload size to be able to upload these directly to their WordPress. Most commonly people run into this problem when they are in charge of a photography site or when they want to sell digital products.

Want to optimize your images for a faster site? Read our guide on “How To Optimize Images With Shortpixel

How to check your maximum file upload size limit in WordPress

You can do this by going to Media > Upload New in your WordPress dashboard. The Maximum Upload File Size setting will show you the largest file size that you can upload on the right bottom of the page.

Maximun upload file size.

How to increase maximum file upload size

Method #1 – Contact your WordPress hosting provider

One of the easiest ways to increase your WordPress site’s maximum file upload size is to ask your hosting provider. Simply send them an email or contact their support to request the increase. For example, with Bluehost, you can simply contact them through their chat.

Method #2 – Edit the php.ini file

The second way to increase your WordPress site’s maximum file upload size is to edit your php.ini file through cPanel. This can be easily done by logging into your cPanel and looking for the “MultiPHP INI Editor” -tool.

MultiPHP INI Editor

After locating it click it and you should see your PHP.INI settings as follows. The maximum file upload size can be found at the bottom “upload_max_filesize“. Change your 2 MB to 128 MB and press “Apply” to change it. You should now have the maximum file upload size set to 128 MB.

Method #3 – Edit php.ini through SSH

If you can’t access a cPanel or don’t have one you can always edit the php.ini directly through SSH. Simply log in to your host through your SSH client, find the php.ini file, and edit the “upload_max_filesize” to your liking

display_errors = XXXX
max_execution_time = XXXX
max_input_time = XXXX
max_input_vars = XXXX
memory_limit = XXXX
post_max_size = XXXX
session.gc_maxlifetime = XXXX
session.save_path = XXXX
upload_max_filesize = 128M
zlib.output_compression = XXXX

Method #4 – Edit .htaccess

Another method of changing your maximum file upload size is to change it through your .htaccess file. This can again be edited through your cPanels file manager or through SSH. To change the maximum file upload size you need to add the following code to your .htaccess.

php_value upload_max_filesize 128M

After adding the following code your new maximum file upload size should be 128 MB.

Note – This method is only possible with specific server technologies that support .htaccess files.

Similar Posts

Leave a Reply

Your email address will not be published.