Home » Guide » How to Increase Maximum File Upload Size in WordPress

How to Increase Maximum File Upload Size in WordPress

If you’ve ever attempted to upload a big media file to your WordPress website, you may have received an error notice informing you that the file exceeds the maximum upload size. In the case of a multimedia-heavy website, this might be a significant stumbling block to progress.

Fortunately, this restriction may be circumvented. Increasing your maximum file upload size and getting your material published is possible for everyone, regardless of experience level with coding or avoiding it entirely.

What sets your default limit upload size and why it exists will be covered in this article. Afterward, we’ll look at three easy ways you may improve this number. What are we waiting for?

Why Expand Your Upload Capacity?

Read on if you’re wondering why WordPress even has a file upload size limit. Many individuals use WordPress to distribute large media files of various types and putting a preset limit on it defeats the whole point of doing so.

The answer is a two-step process

To begin, these restrictions are determined by your hosting provider, not WordPress. It’s up to the server to establish the maximum upload file size.

Add New under Media in your WordPress dashboard’s sidebar will show you your initial limit.

There is no one-size-fits-all answer since it all depends on your host.

Because some users may find it hard to meet this cap, it serves a vital function. Malicious people can’t upload large files to your site because of a limit on your set file size.

Even so, you may need to raise the cap at some time. When it comes to high-quality videos, audio files, and images, you may need more storage space than your host provides. If you want to use more media on your WordPress site, this might be a problem.

Many options are available to help you establish a limit. A comment plugin with anti-spam features will also be a good idea if you want to keep up with the ever-growing number of bot submissions.

How to Increase WordPress’s Maximum File Size (3 Methods)

So, what are your options for increasing the maximum upload size on your website? There are three primary methods that we’ll examine one by one to do this.

However, it’s worth noting that each host has its unique way of doing things. Some of these techniques may not be supported by your service provider. It’s best to test out a few different options until you discover the one that works best for you.

Our first option is to access your website .htaccess file by trawling through its code. Don’t worry if you’re not a fan of coding! All you have to do is sit back and enjoy the ride.

Copying and pasting pre-written lines is all that’s required. This is an excellent strategy if you’re acquainted with accessing your site’s files but aren’t as familiar with the actual development process.

.htaccess is a fundamental aspect of your WordPress site. We’ll concentrate on its connection to the server for the time being, although it has a variety of functions. You may ask the server to increase your limit by adding code to .htaccess.

Because of this, a server can only supply what the host allows. Changing the limit to 150 MB in the .htaccess file will not have the intended impact if your server does not handle 150 MB uploads. Don’t hesitate to get in touch with your host directly if you have any questions regarding their policies.

To get started, you’ll need a file manager. In the absence of an FTP client, I suggest using FileZilla. It’s a dependable WordPress plugin that’s simple to use once you get the hang of it.

Related:  How to Add Titles in WordPress Menu Without Linking to a Page

The .htaccess file may be found in your WordPress root folder once you have accessed your site’s files via FileZilla

Next, open a text or code editor and look for the .htaccess file. To finish the file, add the following code:

php_value upload_max_filesize 128M

php_value post_max_size 128M

php_value max_execution_time 300

php_value max_input_time 300

Additionally, you have the option of adjusting the value.

Re-upload the file to the server after making a copy of the original. Afterward, go back to your site’s upload page. Your upload limit has been raised to 128 megabytes (or whatever value you chose). It’s OK to remove your .htaccess file modifications and continue to the next step if nothing has changed.

Create or Modify Your WordPress Site’s php.ini File 

Using FileZilla and tinkering about your site’s coding is also required for this strategy. Although it may need the construction of a new file, the .htaccess solution is easier to implement.

To override your server’s PHP configuration settings, you’ll need to create a file named php.ini. The maximum upload size is one of such options.

Like the .htaccess technique, you can’t exceed the server’s limit upload size with this. Unfortunately, this amount is usually sufficient for most WordPress uploads. Fortunately

If you’re a seasoned FTP user, this is a fantastic approach to use to access your website’s files. If you want to hone your talents in game creation, this is an excellent place to start.

To begin, use FileZilla and go to the root folder of your website.

Check to check whether a php.ini file already exists. In all likelihood, you’ll be disappointed. Open a text or code editor, type “php.ini,” and save it in the root directory.

Paste the following code into your newly created blank document:

memory_limit = 64M

upload_max_filesize = 64M

post_max_size = 64M

max_execution_time = 300

The file must be saved in the correct location after the input code. Check your WordPress upload screen after that. The maximum upload size should now be 64 MB.

Delete the new php.ini file if this doesn’t work for you. Remove the code you entered into the php.ini file if it was already there when you began. After you’ve finished with that, you’re ready to go on to our last advice.

Directly Contact Your Web Host

Because your site hosting provider controls your file size restriction, they may be able to raise it for you. Contacting your host may be a simple solution to this issue, albeit it may take some time depending on how quickly they respond to support requests.

If none of the preceding options have worked out for you, it’s time to try something else. Also, if you don’t want to mess around with your WordPress site’s files yourself, this is an excellent solution for you.

Contact your web host’s support staff to see if they can assist you. As long as the request is not unreasonable, many hosts are more than eager to oblige. As a result, you should consider the value of a strong customer support staff while you’re looking at hosting providers.

In Conclusion

It might be challenging to get around the maximum file size restriction. Fortunately, a little coding or assistance from your hosting company may help you enhance it.

Increasing the maximum upload size on your WordPress site may be accomplished in three methods, as described in this guide:

  1. Modify the existing .htaccess file with code.
  2. The php.ini configuration file may be found in the root directory of your website.
  3. Ask for help from your web host.