How to increase the maximum upload size in WordPress

A low WordPress upload size limit prevents you from uploading large files, plugins and themes. If you’re building a media-heavy website, that can be a considerable hurdle. It is necessary to increase the maximum upload size on WordPress or your server (or both) in such cases.

Try a free demo
Depending on your hosting and server provider, there are many ways to resolve this issue. We’ll cover them all in this article and show you how to quickly increase the maximum upload size in WordPress.

Let’s dive!

What is the maximum upload size in WordPress?
Uploading large files to a server consumes a large amount of server resources. To prevent users from causing server timeouts, the default maximum upload size in WordPress generally ranges from 4MB to 128MB. Typically, the hosting provider sets this limit at the server level.

WordPress also includes constants that define this limit, but they cannot override the server-side setting in most cases.

To verify this, go to the Media Library of your WordPress site. Here, try to upload a file that crosses this maximum upload file size limit. You will see an error message similar to this:

The “exceeds the maximum upload size for this site” error can be frustrating, but it exists for two main reasons: security and efficiency. Prevents site owners and other users, including malicious actors, from uploading huge files (eg, high resolution images, large videos).

Otherwise, you can disable your website’s server and have your site crawled. Or worse yet, it can bring your site down entirely!

4 ways to increase the maximum upload file size in WordPress


There are many ways to fix WordPress maximum upload size issue. We’ll start with the easiest ones first, and then move on to the intermediate level tutorials.

1) Contact your hosting provider for help

If you’re having trouble uploading files and file size limits, contacting your hosting provider for help is one of the quickest solutions. Increasing the upload limit is a trivial task for tech support, so most hosting companies can help you fix this problem quickly. Messing around with your server or site configuration files can always be a challenge. Therefore, we always recommend that you try this method first.

If you’re hosting your site with Phluit, our knowledgeable support team is just a click away and available 24/7. To get started, go to your Phluit dashboard and click the chat icon in the bottom right corner.

2) Update your “.htaccess” file


If your web server is running on Apache, you can update your site’s .htaccess file to increase the maximum upload size in WordPress. You can find your .htaccess file in the root directory of the WordPress site.

Access your .htaccess file via FTP / SFTP or your hosting provider’s File Manager.

Open the .htaccess file with a text or code editor, and then add the following code:

php_value upload_max_filesize 32M
php_value post_max_size 64M
php_value memory_limit 128M
php_value max_execution_time 300
php_value max_input_time 300

You can see two other PHP directives in the code above: max_execution_time and max_input_time. They define how much time a server spends on a single PHP task. The bigger your loads, the more time you spend. You should set their values ​​to a number that is appropriate for your use case.

Note: You may get a 500 internal server error after using the above method. This is most likely because your server is running PHP in CGI mode. In such cases, you cannot use the above commands in your .htaccess file.

3) Create or Modify your ‘php.ini’ file

The php.ini file; is where you define changes to the default PHP configuration. It typically contains directives that define file timeouts, maximum upload size, and resource limits.

Using SSH or FTP , you can find the php.ini file; in your WordPress root directory. In some cases, you may not find it there. Do not worry! You can create a new file with the same name in the root directory of your site.

Using a text or code editor, add the following code to your existing or new php.ini file:

upload_max_filesize = 32M
post_max_size = 64M
memory_limit = 128M

Don’t forget to save your file after making changes. Some hosts do not allow you to modify PHP settings through this method. In such a case, you can proceed to try the next solution.

Change PHP options through cPanel


If your hosting provider uses the cPanel control panel to help you manage your server and site settings, you can change the maximum upload file size through their interface.

To get started, go to your cPanel control panel and select Select PHP Version in the Software section.

Here, you can change the current PHP version of your server and enable/disable many PHP extensions. Click the Options link in the navigation menu to go to the PHP Options panel.

If you have any questions about these values, we suggest you contact your hosting provider. The latest cPanel control panel saves your changes automatically, so you don’t have to click anything.

Remember that if you have your website hosted on Phluit we take care of doing this for you. If you still do not have your website hosted with us. What are you waiting for? Check out our plans!

Table of Contents

Stay in the Loop!

Subscribe to Phluit’s Newsletter and stay updated with the latest.

Subscription Form

Ready to buy or sell your
online business?

Explore listings or list your business today on Phluit. Start your journey now to achieve your business goals with our trusted platform.

Share to...