Discover in this article our 3 methods on how to increase the maximum file upload size in WordPress (3 methods)

If you've ever tried to upload a large media file to your WordPress website, you might have seen an error message telling you that it exceeded the maximum file upload size. This can be a hindrance, especially if you are creating a website with lots of multimedia elements such as images and videos.

Fortunately, there are ways around this limitation. Whether you're new to coding, more familiar with it, or want to avoid this route altogether, there's a method to increase the maximum upload size of your files and publish your content.

In this tutorial, we'll discuss what determines your default maximum file upload size and why it exists. Next, we'll explore three simple methods you can use to increase that number.

Why increase the maximum upload size of your files

You might be wondering why there is a maximum file upload size in WordPress. Many people use WordPress to share all kinds of media with huge files. If it can be increased anyway, what's the point of putting a default cap?

The answer is twofold.

First of all, it's not WordPress that sets these limits, but your hosting provider. The maximum upload file size is a server-level setting and as such is up to them.

You can find your initial limit by going to Add under Media in the sidebar of your WordPress dashboard. In this example, the upload limit is 8MB:

Some hosts keep a limit as low as 2MB, others will set it around 40MB, and some will peak at a whopping 150MB. It all depends on your host and what they have decided to provide.

Second, while the limit might be a little difficult for some users, it serves an important purpose. A maximum upload size prevents malicious users from flooding your website with huge files that can slow down your servers.

However, you may need to increase the limit at some point. High-quality videos, audios, and photos may have higher requirements than your host. This can be a problem if you are trying to fit more media into your WordPress website.

Fortunately, there are several ways to set the limit you need. If you're trying to get ahead of bot downloads, you might also consider pairing one of the following methods with a WordPress comment plugin equipped with anti-spam functionality.

How to Increase Maximum File Upload Size in WordPress (3 Methods)

So how do you increase the maximum upload size of your website? There are three main ways to do this – let's look at each in turn.

Before that, however, it bears repeating that each web host operates a little differently. Some of these methods may not work with your provider. I recommend trying one solution at a time until you find the one that suits your needs.

1. Add code to your WordPress website's .htaccess file

Our first method is to dig into your website's code and access its file .htaccess. If you're not a code fan, don't worry! You won't have to write it yourself.

All you have to do is copy and paste a few pre-written lines. This makes it a good approach if you're comfortable with accessing your website's files, but not as experienced in actual development.

The file .htaccess is an essential part of your WordPress website. Although it serves multiple purposes, the one we will focus on here is its relationship to the server. By adding code to .htaccess, you instruct the server to lift your limit.

Of course, a server can only provide what the host allows. For example, if your host does not have the capacity to support 150MB uploads, changing the limit to 150MB in the file .htaccess will not have the desired effect. If you have any doubts about what your host allows, you can contact them directly for more details.

You will also need a file manager to get started. If you haven't yet File Transfer Protocol (FTP) client, I recommend you fileZilla. It is a reliable tool to use with your WordPress website and learning how to use it is quite simple.

Once you have accessed your website files using FileZilla, open your WordPress root folder to find your file .htaccess:

increase maximum upload size

Then open the file .htaccess using a text or code editor. Copy and paste the following code at the end of the file:

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value max_execution_time 300
php_value max_input_time 300

You can also use different values.

Your file .htaccess should now look like this:

increase maximum upload size

Save the file and upload it again to the server. Next, revisit your website's upload page. The upload size should now be at 128MB (or whatever value you chose). If it hasn't changed, you can delete your additions to the file .htaccess and move on to our next strategy.

increase maximum upload size

2. Create or edit your WordPress website's php.ini file

This method will also require you to use FileZilla and root in your website code. However, since this may require creating a new file, it's a bit more tricky than the approach .htaccess.

What you will need to do is create a file called php.ini, which will override your server's PHP configuration settings. One of these parameters is your maximum upload size.

Similar to method .htaccess, it cannot extend your upload size beyond the maximum capacity of the server. Fortunately, this maximum is usually more than enough for typical WordPress uploads.

If you're a little more experienced with using an FTP client to access website files, this is a good method to try. It can also be a useful introductory challenge if you're looking to practice your development skills.

The first step is to use FileZilla to open your website's root folder:

increase maximum upload size

Check if there is already a file named php.ini. Chances are he's not there. In this case, just create a file in your text or code editor, name it “php.ini” and save it to your root folder.

Next, copy and paste the following code into your new empty file:

memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Once you've entered the code, make sure you've saved the file to the correct location. After that, you can check your WordPress upload screen. The maximum file upload size will be 64MB.

If you have no luck with this approach either, delete the new file php.ini. If there was already a file php.ini when you started, just delete the code you pasted there. Once you've cleaned everything up, you can move on to our third and final tip.

3. Contact your host directly

Since your file size limit is directly controlled by your providerWeb hosting, it probably also has the power to increase it for you. You may have to wait a bit depending on your web host's customer response times, but contacting them can be an easy way to address this issue.

If none of the above methods worked for you, this is the way to go. It's also a good option if you're not interested in editing your WordPress website files and would rather have someone else take care of that task.

All you have to do here is contact your host's support team to see if they can help you. Many hosts are happy to accommodate reasonable requests. Plus, keep in mind that this is another reason to consider the importance of a robust customer support team when looking at your hosting options.

Discover also some premium WordPress plugins  

You can use other WordPress plugins to give a modern appearance and to optimize the handling of your blog or website.

We offer you here some premium WordPress plugins that will help you do that.

1. LetsPush Web Push Notification

Web Push Notifications, also known as Browser Push Notifications, are clickable messages that can be sent by the website to the user even without knowing his email or other contact information.

Letspush web push notification plugin for wordpress woocommerce buddypress

Its notifications are delivered in real time, even when the user is not browsing your website. This WordPress Plugin also allows the administrator to send push notification messages to users who are subscribed to the website.

So you can send a personalized message, sell a product or send updates about your website to your visitors. It integrates strongly with BuddyPress and is compatible with WooCommerce.

Download | Demo | Web hosting

2. Super Social Content Locker

Super Social Content Locker is an all-in-one plugin, with social content locking functionality for your blog. In particular, it allows you to lock your content and customize the unlocking mode your visitors will use.

Super social content locker wordpress plugins lock website content

Thus, to unlock content, users will for example follow you or share the content of the website on social networks, or watch your video advertising. They may also be asked to fill in a form, or simply to participate in a vote.

Read also our article on 8 WordPress plugins to easily create your layouts

This plugin can be used in two ways: on a widget lateral bar stand-alone or anywhere on the website.

Download | Demo | Web hosting

3. WooCommerce Social Login

Ce WordPress Plugin premium helps reduce website registration time, which usually annoys users and reduces your sales. But if you use WooCommerce Social Login, the time saving of the user will be increased, which will inevitably increase your sales as well.

How to boost a social network with the WordPress BuddyPress plugin - Woocommerce social login wordpress plugin

When a customer visits your website for the first time, you will simplify checkout by allowing them to checkout as a guest. However, this creates friction for customers who want to buy multiple times from your online store. They will have to create a different username and password each time.

Discover also our 50 WooCommerce plugins to improve your online shop

WooCommerce Social Login therefore makes this process as easy and secure as possible - customers can log into your website using their Facebook, Twitter, Yahoo, LinkedIn, Foursquare, Windows Live, VKontakte (VK.com), PayPal, Instagram accounts. and Amazon.

Download | Demo | Web hosting

Recommended Resources

Find out about other recommended resources to help you build and manage your website.

Conclusion

The maximum file upload size can be a hard limit to circumvent. Luckily, you can increase it with a bit of code or help from your hosting provider.

Here is ! That's it for this tutorial, I hope now you know when and how to increase the maximum file upload size in WordPress. Do not hesitate to share with your friends on your favorite social networks

However, you will also be able to consult our resources, if you need more elements to carry out your projects of creation of Internet sites, by consulting our guide on the WordPress blog creation.

And if you have any suggestions or remarks, leave them in our section Comments.

...