This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Increase Maximum Upload File Size in WordPress [9 Easy Ways]

Updated on March 5, 2025

12 Min Read
increase media file upload in wordpress

Key Takeaways:

  • Hit a wall uploading files to WordPress? This guide provides several easy ways to increase your maximum upload size, so you can add those large images, themes, or plugins without a hassle.
  • From editing code to using plugins, find the perfect solution to bypass upload limits and keep your WordPress site running smoothly.

Every WordPress hosting provider sets limits on file upload sizes. Usually, this number is between 2 MB and 500 MB. For Cloudways users, we set default limit to 20 MB, but you can increase it to as per your need, depending on your server size.

For most users, this limit is enough. But if you’re here, you’re likely dealing with larger files like high-res images, plugins, or themes that exceed this limit.

Switching to a fully managed WordPress hosting provider that lets you scale server resources flexibly is the best way to fix the max upload file size issue. Ahem, Cloudways. However, you have other options as well.

In this blog, I’ll show you several ways to increase the maximum upload file size in WordPress.

No More ‘File Too Large’ Errors

✓ 1-click PHP settings adjustment (Increase upload size in seconds)
✓ Pre-configured servers for large media files (up to 4GB by default)
✓ No coding or .htaccess edits required

What Is the Maximum Upload Size for WordPress & Why Increase It?

As I mentioned earlier, the maximum file upload size for WordPress can be anywhere between 2 MB and 500 MB.

When building a website, you’ll naturally upload different media files like images, videos, themes, plugins, etc. However, uploading large files will be an issue if the max upload size is set to the bare minimum.

Here are some scenarios, for example, where you’d want to increase max upload size in WordPress:

  • Uploading High Quality Images: If you’re a photographer or designer, you may need to upload large, high-resolution images for your portfolio.
  • Adding Larger Themes or Plugins: Some WordPress themes and plugins come with heavy files, and the default limit might block them.
  • Selling Digital Products: If you’re offering items like videos, eBooks, or courses, their file size might exceed the limit.
  • Using Media Files Often: Sites that rely on videos, audio files, or detailed graphics can quickly run into these limits.
  • Frequent Content Updates: If you’re regularly adding new resources, like downloadable files or campaign materials, the limit might slow you down.

If you’ve faced one of these issues, keep reading, as I’ll show you how to check and increase the upload limit in multiple easy ways.

How to Check the Current Maximum Upload File Size in WordPress?

When you upload files like images or media to your WordPress site, the platform will show you the file size limit on the upload page.

To check your WordPress site’s current max upload size limit, navigate to: WP Admin > Media > Add New.

You will see the current max upload size on the bottom, as shown in the screenshot.

If the current max upload size limit meets your demand, you can leave it as it is. However, if it doesn’t, let’s move forward, and let me walk you through different ways to increase the maximum upload size in WordPress.

30% Off While You Fix Upload Limits

Get 3 months discounted hosting with:
✓ Auto-scaling for media-heavy sites
✓ Free SSL for secure uploads
✓ 24/7 expert support

How to Increase Max Upload Size in WordPress?

If you’re still with me, here are the best methods to change upload limit in WordPress.

Note: Keeping WordPress files under 100KB helps with speed. For larger files, aim for 100KB to 1MB to avoid slowing down your site.

  1. Update .htaccess File
  2. Edit functions.php File
  3. Create or Edit php.ini File
  4. Increase Upload Size in Multisite
  5. Modify wp-config.php File
  6. Create or Modify user.ini File
  7. Increase Maximum Upload File Size via cPanel
  8. Using Plugin Method
  9. Contact Your Hosting Provider

1. Update .htaccess File

If your web server is using Apache and PHP is set as an Apache module, then you can add a few lines of code in your WordPress .htaccess file to increase the maximum upload size in WordPress.

Warning!

A single misplaced dot (.) can potentially bring your website down. Thus, before making any changes to the .htaccess file, back it up at an offsite location. Contact your WordPress hosting provider if anything goes wrong or if you need assistance.

To access your .htaccess file, connect to your server via FTP client and navigate to the folder where WordPress is installed. To connect your server via an FTP Client like FileZilla, you need the following values:

  • Host
  • Username
  • Password
  • Port

If you can’t see the .htaccess file, enable the “Force Showing Hidden Files” option in FileZilla to reveal it. Check the image below:

Open up the .htaccess file in a code editor or Notepad and add the following lines.

php_value upload_max_filesize 64M

php_value post_max_size 128M

php_value memory_limit 256M

php_value max_execution_time 300

php_value max_input_time 300

This will define the maximum upload size in Megabytes. Replace the numbers as per your requirement. Just ensure that your hosting provider allows changes to .htaccess file settings.

The max execution time and max input time are in seconds. The execution time defines the limit of time spent on a single script. Choose a number that is suitable for your site.

If you don’t want to use the FTP method described earlier, you can use cPanel, which is available in your hosting account.

Here’s how:

  • Log into cPanel and open File Manager.
  • Go to the public_html folder and find your WordPress folder.
  • Right-click on the .htaccess file and choose “Edit.”

  • Add your code before “# BEGIN WordPress.”

Lastly, you can also edit the .htaccess file by using a WordPress plugin such as Htaccess File Editor. This plugin lets you edit the .htaccess file directly from the WordPress backend.

Tired of WordPress upload limits?

Swap solutions with other users and experts in the Cloudways Reddit Community, because large files shouldn’t be a headache!

2. Edit functions.php File

WordPress officially recommends using NGINX and Apache to handle server configurations for best performance.

However, if your WordPress site is running on NGINX, you won’t find the .htaccess file, as NGINX doesn’t use it. In such a case, you can edit the WordPress theme files to increase max file upload size.

To access your functions.php file, go to WordPress Dashboard →  Appearance →  Theme File Editor and select Theme Functions file.

Now add the following code:

@ini_set( 'upload_max_size' , '64M' );

@ini_set( 'post_max_size', '64M');

@ini_set( 'max_execution_time', '300' );

This code increases the upload file size limit to 64MB, sets the post size limit to 64MB, and extends the maximum execution time for PHP scripts to 300 seconds.

Note: if you change the theme, the max upload size will return to its default values until you edit the functions.php file of the new theme, as the following code is added to only your current theme.

If you’re not comfortable with coding, you can also go with the plugin method. Just use any WordPress plugins for adding code snippets. For example, Code Snippets.

Here’s what you need to do:

  • Install and activate the plugin, and then click on Add New to add your custom code snippet. You can add the same code as earlier.

If you don’t want to use a third-party plugin, you can also create your own custom code snippet plugin. I covered how to do that here.

3. Create or Edit php.ini File

This is a default file used to configure any application running on PHP. It contains parameters required for file timeout, upload size, and resource limits.

Access your WordPress root directory using SSH or FTP and look for a php.ini file. If the file is not visible, you can create a new one.

I’ll create a new file. Open any text editor and create a new file on your desktop. Copy the following code and save it as php.ini.

upload_max_filesize = 64M

post_max_size = 128M

memory_limit = 264M

If you create a new PHP.ini file, then upload it using SSH or FTP inside the same root folder.

4. Increase Upload Size in Multisite

If you are running WordPress multisite, you can increase the upload size from the settings. Go to your Network Admin dashboard and navigate to Settings > Network Settings.

Scroll down to locate the Upload Settings section, where you’ll see the field for Maximum upload file size.

By default, WordPress Multisite sets this limit to 1500 KB (1.5 MB). You can adjust this limit by entering a higher value and then clicking the Save Changes button.

This increase is dependent on your server settings. If your server is set to 20 MB, you cannot increase the WordPress upload size to 25 MB. However, if your server is set to 20MB and your network setting is set to 15 MB, you can resolve the issue by increasing the upload size to 20 MB.

In Cloudways, you can quickly increase the server-side upload limit by changing the default 100 MB limit.

5. Modify wp-config.php File

Another way of increasing the upload size in WordPress is to define the size parameter in the wp-config.php file. To do that, access your WordPress root directory using SSH or FTP and locate a wp-config.php file.

Open the file in any text editor and add the following code.

@ini_set( 'upload_max_size' , '20M' );

@ini_set( 'post_max_size', '13M');

@ini_set( 'memory_limit', '15M' );

Save your changes, and it should increase your file upload size.

6. Create or Modify user.ini File

Another method is to use a .user.ini file if your hosting provider restricts changes to the global PHP settings.

Check your site’s root directory for a .user.ini file. If it’s missing, create a new one like we did in method 3 and add the following lines:

upload_max_filesize = 50M

post_max_size = 100M

memory_limit = 200M

This works the same as php.ini, allowing you to modify upload limits based on your hosting setup.

7. Increase Maximum Upload File Size via cPanel

If your hosting provider uses cPanel, you can increase the maximum upload file size through its settings.

To increase the upload file size in cPanel, go to Select PHP Version under the Software section.

Click Options, then scroll down to adjust upload_max_filesize, post_max_size, memory_limit, max_execution_time, and max_input_time.

In my case, changes saved automatically since I’m using a newer cPanel versions. But older ones may require clicking Save Changes. If unsure, best option is to contact your hosting provider.

8. Using Plugin Method

Not everyone enjoys writing code or accessing root files using SSH or FTP. In that situation, a plugin comes in handy. I’ll use the Big File Uploads plugin by ClikIT.

  • Go to your WordPress DashboardPluginsAdd new, search “Big File Uploads“, then Install and Activate the plugin.

big file uploads plugin

  • Once installed, go to plugin settings and simply enter the value for upload size.

  • Click the Save Changes button to apply the new upload size.

9. Contact Your Hosting Provider

If messing with server settings isn’t your thing, the easiest solution is to ask your hosting provider to increase the upload limit for you. It’s a quick fix on their end and usually takes just a few minutes.

Cloudways users can reach out to 24/7 live chat support for assistance. Those with Advanced or Premium Support add-ons get even faster response times and direct access to expert support.

If you do not want to edit the files, you can always contact your hosting provider to do it for you.

Hosting for Large Media Files – From $11

✓ Optimized for high-resolution images/videos
✓ NVMe storage for faster uploads
✓ Free staging to test changes

How to Upload Large Files via FTP/SFTP?

If none of the previous methods worked or you can’t contact your hosting provider to increase the upload limit, you can upload large files using FTP/SFTP.

The process is simple. For a quick refresher, check out method 1 covered in this guide.

Simply connect to your server using an FTP client like FileZilla, then drag and drop the files into your WordPress uploads folder.

For example, I’ll add a custom page template file in WordPress.

After establishing an SFTP connection with my server, I’ll navigate to the /wp-content/themes folder. In the current theme folder, I’ll upload the PageWithoutSidebar.php file.

Now if I go to WordPress Admin Panel > Pages > Add New, in the page attributes section, I should see the new custom page template listed.

Note: Sometimes WordPress may not recognize files uploaded this way. If that happens, you can use the Add From Server plugin to import files.

How to Prevent Large File Uploads Using WordPress’ upload_size_limit Filter?

Displaying large files, like videos and images, on your website can slow down its performance. To prevent non-admin users from uploading large files, you can set a size limit using the upload_size_limit filter in WordPress.

Here’s an example:

function custom_upload_size_limit( $size ) {
    if ( ! current_user_can( 'manage_options' ) ) {
        $size = 1024 * 5120; // 5 MB
    }
    return $size;
}
add_filter( 'upload_size_limit', 'custom_upload_size_limit', 20 );

In this code:

  • We’re using WordPress’s manage_options capability to check whether a user has admin rights.
  • If the user isn’t an admin, the upload limit is set to 5MB (or 5120KB).
  • Admins won’t be affected by this limit and can still upload larger files.

Now, you’re probably wondering, “Where do I put this code?”

Well…to the functions.php file.

Here’s how:

  • Go to your WordPress dashboard.
  • Under Appearance, click on Theme Editor.
  • Find the functions.php file in the list of theme files on the right side.
  • Scroll down to the very bottom and paste the code right before the ?> tag (if there’s one).
  • Click Update File to save your changes.

Summary

I hope this guide helped you understand how to increase maximum upload file size in WordPress. I tried to cover all possible solutions on how to increase WordPress upload size.

However, some methods may not work for all users. If in case the above methods don’t work for you, the best thing to do is contact your hosting provider.

Other options include preventing non-admin users from uploading large files in the first place or upload large files via FTP/SFTP.

If you know of any other methods that I’ve missed, please let me know in the comments.

Upload Gigabytes, Handle Traffic Spikes

Cloudways Autonomous ensures:
✓ Zero downtime during large uploads
✓ Auto-scaling for traffic surges
✓ Built-in CDN for global delivery

Q. How can I increase the maximum upload size through the hosting provider?

A. Most hosting providers, like Cloudways, offer an option in the server settings to increase the maximum upload file size for WordPress. If you can’t find this option, check your provider’s knowledge base or reach out to their support team for assistance.

Q. Can increasing maximum upload size have an effect on site load speed?

A. Increasing the upload size can impact your site speed if files aren’t optimized. It’s best to avoid changing the upload limit unless needed and focus on uploading optimized files for faster load times.

Q. How to increase the upload size in WordPress?

A. You can increase the upload size in WordPress by editing the php.ini file, modifying the .htaccess file, or adding custom code to the wp-config.php file. Or, simply contact your hosting provider to adjust the settings for you.

Q. How do I increase the maximum page size in WordPress?

A. To increase the maximum page size, go to your php.ini file and adjust the post_max_size and upload_max_filesize settings. Make sure the values are higher than what you need to upload larger pages or files.

Q. How do I increase the max upload file size in WordPress multisite?

A. To increase the max upload file size in WordPress Multisite, go to Network Admin > Settings and update the “Max upload file size” option. If needed, you can also modify the php.ini file or use the .htaccess method to ensure your server settings are updated.

Q. How to increase maximum upload file size in WordPress cPanel?

A. To increase the upload file size in WordPress through cPanel, log in to cPanel, go to Select PHP Version, then click Options. From there, you can adjust the upload_max_filesize, post_max_size, and memory_limit values. Alternatively, you can edit the .htaccess or php.ini file using the File Manager.

Q. How do I upload a large file to WordPress?

A. To upload large files, ask your host to increase the limit or use the Big File Uploads plugin. FTP is another option—I covered that earlier in this guide.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Abdul Rehman

Abdul is a tech-savvy, coffee-fueled, and creatively driven marketer who loves keeping up with the latest software updates and tech gadgets. He's also a skilled technical writer who can explain complex concepts simply for a broad audience. Abdul enjoys sharing his knowledge of the Cloud industry through user manuals, documentation, and blog posts.

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour