How to Increase WordPress Max Upload Size

Are you looking to increase WordPress max upload size? We’ve got your back.

WordPress has a file upload size limit. Sometimes you might want to upload a file that is large in size and the upload size limit might prevent you from uploading your file. There are several ways to increase your WordPress max upload size. In this post, we are going to take a look at some of the best methods of increasing the file upload size limit in WordPress.

If you are creating a media-heavy WordPress website, the WordPress maximum file upload size may be an issue. Depending on your hosting provider and server, there are several methods of solving this problem. In this article, we’ll see how to increase the maximum upload file size in WordPress using various approaches. Let’s get started!

What is the WordPress maximum upload file size?

When you upload large files to a server, it consumes a bigger amount of server resources. This might result in server timeouts. In order to prevent users from causing this timeout, WordPress has a limited file upload size. Generally, the WordPress max upload size ranges from 4MB to 128MB. In most cases, the hosting provider sets the limit at the server level.

WordPress actually has constant values that define the upload size limit. But if the settings are changed in the server, the constants cannot override it.

To verify this information, log in to your WordPress admin dashboard and go to the Media Library section. Then click on upload and you should see the WordPress max upload size. Try uploading a file that exceeds this limit and you will see an error message saying “this file exceeds the maximum upload size for this site”.

Although this message might be annoying it’s there for two reasons: security and efficiency. It limits the site users and malicious sources from uploading large files. Otherwise, it will cause serious issues in your server making your website extremely slow or worse making your site inaccessible.

Get Latest Post Notifications!

Subscribe to our newsletter

How to check Maximum File Upload Size in WordPress

There are a couple of ways to check out the maximum file upload size in WordPress. In the previous section, we already discussed an approach. Let’s take a look at some more methods for checking your maximum file upload size in WordPress.

In Media Library

This is the fastest method of checking your WordPress max upload size. We already discussed this, but still, let’s take a look at how you can do it. First, log into your WordPress dashboard. From the dashboard, go to Media > Library. Then click on the ‘Add New’ button. At the bottom, you’ll see the WordPress max upload size.

check wordpress max upload size

As you can see, the maximum file upload size of the site shown above is 40MB. This is the fastest method of checking the WordPress max upload size.

Site Health

You’ve probably noticed the site health information on your WordPress dashboard as soon as you login. This feature informs you of the overall condition of your website. It also keeps more detailed stats of your website. To access these, go to Tools > Site Health from your WordPress dashboard. Then select the ‘Info’ tab and unfold the ‘Media Handling’ bar. Here you can see the maximum file size of your site.

max size of an uploaded file in site health of WordPress

If you notice the “Max size of an uploaded file” you’ll know the maximum file upload size allowed on your site.

You can also get this information from the server option in Site Health information. Look for ‘Server’ (should be located beneath Media Handling). Click on the ‘Server’ section to unfold it and notice the “Upload max filesize” information. You’ll see the file size upload limit.

upload max filesize in Site Health Server

So these are the ways through which you can know your file size limit. You can also learn about other values such as PHP post max size, PHP memory limit, etc. from there.

Why increase WordPress Max Upload Size Limit?

Generally, your hosting provider sets your maximum file upload size limit for WordPress. In most cases, the default value set by a good hosting provider is enough for a general-purpose website. But you might have a different requirement and want to upload larger files on your website. Besides, there are various reasons why you would want to increase the WordPress max upload size limit. Here are a few reasons:

  • You have a photography website and you need to upload high-quality images
  • You want to sell digital products like eBooks, photos, videos, etc. Sometimes these files exceed hundreds of megabytes.
  • You want to install a large WordPress theme or plugin through your admin dashboard.
  • You keep updating your site regularly with photos, audio, videos, etc. for your users.
  • You want to upload a high-quality video or photo in one of your website’s sections or background image etc.

In general, these are the reasons why you would want to increase the WordPress max upload limit.

Now we know what is WordPress’s maximum file upload size, how to know your max file upload size, and why you would want to increase WordPress’s max upload size. Let’s now learn how to increase file upload size in WordPress.

Method 1: Contact the hosting provider for help

Reaching out to your hosting provider is the quickest way of increasing file upload size. Increasing the max file size limit is a very easy task for the tech support team of any hosting provider. So contacting the support team of your hosting provider is perhaps the best method of increasing the file upload size limit in WordPress.

Updating your WordPress files might not be a good idea if you are a beginner. Therefore, to avoid unnecessary mishaps, it’s best to first contact your hosting provider for support.

Method 2: Create or edit an existing php.ini file

You can also increase your WordPress file upload size by editing the php.ini file. The php.ini file is the place where you can define changes to your default PHP settings. Normally this file contains directives that define file timeouts, max upload size, and other resources.

But to edit your php.ini file, you have to have access to your WordPress files. The best way to access your WordPress files is either using the File Manager from cPanel or using SSH or FTP.

public_html in file manager

The php.ini file should be located in the root directory of your WordPress website. In some cases, you might not see this file in the root directory. If that is the case, then you can create a new file with the name “php.ini” and save it.

Just edit (or create) the ini file and add the following codes to it (modify the values in case of an existing file):

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

After adding/modifying the above code, save your changes. But some hosting providers don’t allow you to make changes to the PHP settings in such a manner. If that’s the case, then don’t worry, we still got more methods to try.

👉 How to Increase WordPress Memory Limit

Method 3: Change PHP options via cPanel

Many hosting providers give you access to cPanel. Using the cPanel dashboard, you can manage your server and site configuration. You can also change your file upload size limit from the options given in cPanel. To do this, scroll to the ‘Software’ section and click on the ‘Select PHP Version’ option there.

changing php version from cPanel

From here, you can change your PHP version and tweak several other PHP extensions. If you have multiple sites, select the site where you want to increase the file upload size limit. Now select ‘Options’ then scroll down and you can edit the WordPress upload_max_filesize, post_max_size, memory_limit, etc.


If you don’t see any options here, then you probably have the native php version selected (for example native 8.1). Click on the dropdown and select only 8.1 and you should see the options immediately.

After you make your changes, simply exit out of this option and it will be saved automatically. But if you are using an older version of cPanel, then you might see a ‘Save Changes‘ button. Click on it to save your changes.

Method 4: Add code to your WordPress theme function.php file

If you are uncomfortable making changes from your cPanel then there’s another method that you can try. But you have to edit your theme’s function.php file. To access your WordPress theme’s function.php file, you can either use FTP/SFTP to locate it, or you can access it from within your WordPress admin dashboard.

To access the function.php file, go to Tools > Theme files from your WordPress dashboard. On the right side of the screen find the function.php file. Note that, every theme is different and can have the function.php file in a different location. The following is the function.php file of the Astra theme.

After opening the function.php file, add the following code to the file:

@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );

Then save your changes and check if your file upload size limit has increased. If this method doesn’t work, there are still a few other ways to try it out.

Method 5: Add code to your .htaccess file

There is another method through which you can increase your WordPress file upload size limit. It involves modifying your .htaccess file which controls high-level configuration settings for your WordPress website. But for that, you need to make sure that your web server is running Apache, in order to update your site’s .htaccess file.

The .htaccess file is located in your WordPress root directory. So to access this file, you need to again use FTP/SFTP or use the File Manager in cPanel. There are 3 directives that are responsible for how WordPress handles uploads. These are:


You’ve already seen these directives in the Site Health information in the WordPress dashboard. In order to increase the file upload size limit, you have to modify these directives. For example, if you are looking to upload a maximum 32MB file then modify these directives in the following way:

Upload_max_filesize =32M
Post_max_size = 64M
Memory_limit = 128M

It is a good idea to change the other directives along with the WordPress upload_max_filesize. Because your uploads might contain extra information in addition to the file itself.

Method 6: Use a WordPress plugin

There are plugins that you can use to increase your maximum file upload limit in WordPress. Because adding code to WordPress files and using FTP/SFTP might be a hassle for many people. So you can try out this method. There are various plugins for this job, we are using WP Maximum File Upload Size plugin for this demonstration.

You can install the plugin by going to Plugins > Add New from the WordPress dashboard. The plugin is developed by CodePopular and it has 40,000+ active installations. It’s also very easy to use.

Increase maximum upload file size plugin

After you install and activate the plugin, go to Media > Increase Upload Limit to access the settings option of the plugin. Now on the top, you’ll find the maximum upload file size and the maximum execution time. To increase your maximum file upload size limit, simply click on the drop-down menu and select your preferred limit.

Note: If you want to set the maximum file limit higher than what’s allowed by your hosting provider, then you can’t do it with this plugin. To do that, you need to contact your hosting provider.


That brings our topic to an end. We’ve discussed several methods through which you can increase your WordPress File upload size limit. But there could be even more methods that you can try. Based on what hosting you’re using, you might be given more options to increase your file upload limit. If you’re unsure, you can contact your hosting provider for guidance.

It isn’t too complex and you can do it on your own. So if you are building a portfolio site or a media-heavy site, then you can now start uploading large files easily. Usually contacting your hosting provider is the best approach, but if your hosting providers aren’t responding well, then you can try the other methods mentioned in the list.

So which method do you prefer when you’re increasing your WordPress file upload size limit? Let us know in the comments.

Disclaimer: This post may contain affiliate links and we may receive a small commission if you purchase something by following them. However, we recommend services/products that we believe good to serve your purpose.

Staff Author
Staff Author

A team of WordPress enthusiasts led by Arafat Bin Sultan, a seasoned professional with over a decade of experience in tech blogging, content marketing, and video creation.

Articles: 234

Leave a Reply

Your email address will not be published. Required fields are marked *