How to Increase Media File Maximum Upload Size in WordPress (7 Different Methods)

Written by ASRAF MASUM

Publish: 12 Aug, 2022
Updated:
Reading Time: 12 minutes

Overview →

View Lifetime Deal →

← Alternative to

← Positive Reviews

WordPress is a powerhouse with many themes and plugins that allow you to build almost any website, be it an e-commerce store or a corporate network. However, when choosing WordPress hosting, you should consider performance, security, and support in the first place.

If you are building a WordPress website that hosts a portfolio with large image files or a video hosting site with a single media file size running into GBs, then you might face a roadblock of not being able to upload media files larger than 25MB (in most cases).

What Is the Maximum Upload Size for WordPress?

When building a website, you must upload different media files like images, videos, themes, plugins, etc. And uploading large files can be a hurdle if the upload file size is set to the minimum. Generally, the maximum upload size in WordPress ranges from 2MB to 150MB, depending on your web hosting settings. Your hosting provider usually sets this limit at the server level to prevent timeouts. The default upload file size on Cloudways is 10MB.

How to Check the Current Maximum Upload Size in WordPress?

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.

01-Maximum-Upload-File-Size-in-WordPress

If the current max upload size limit meets your demand, you can leave it as it is. However, if it doesn’t, don’t fret; there are many ways you can increase the max upload size in WordPress.

How to Increase Media File Maximum Upload Size in WordPress?

These are the best methods for increasing WordPress’s maximum upload size of media files.

  1. Update .htaccess File
  2. Edit functions.php File
  3. Edit php.ini File
  4. Increase Upload Size in Multisite
  5. Modify wp-config.php File
  6. Using Plugin Method
  7. Contact Hosting Provider
divi logo white

WordPress maximum upload file size is easier with Cloudways.

Whether you’re a beginner or an expert, Cloudways Platform is based on UI, where you can make changes in a few seconds.

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 max upload size in WordPress.

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 FTP Client like FileZilla, you need the following values:

  • Host
  • Username
  • Password
  • Port
access-filezilla

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 max upload size in megabytes. Replace the numbers as per your requirement. 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.

2. Edit functions.php File

Sometimes, you might be unable to access your .htaccess file or be more comfortable editing WordPress theme files.

You can easily increase the size limits by adding the following lines of code in the functions.php file of your theme.

However, remember 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.

theme-file-editor

However, remember 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.

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

3. Create or Edit php.ini File

This is a default file used to configure any application which runs on PHP. This file 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. In some cases, this file is not visible; the other option would be to create a new file instead.

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
edit-php-ini-file

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, then upload size can be increased from settings. This increase is dependent on your server settings. If your server is set to 20MB, you cannot increase the WordPress upload size to 25MB. 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 20MB.

image4-101

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.

image2-128

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. Using Plugin Method

Not everyone is a fan of writing code or accessing root files using SSH or FTP. For that situation, the plugin comes in handy, and luckily there is a WordPress plugin available for increasing WordPress upload size. The plugin we will be using is the Increase Max Upload Filesize plugin.

increase-max-upload-size-plugin

Go to your WordPress Dashboard → Plugins → Add new, search “Increase Max Upload Filesize”, then Install and Activate the plugin. Once installed, go to plugin settings and simply enter the value for upload size.

add-upload-file-size-value

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

7. Contact Your Hosting Provider

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

If you are using Cloudways WordPress managed hosting, you can easily increase the max upload size limits of all your websites on a single server through the options in the platform. It is only a matter of a few clicks, and if you are not using Cloudways, you can request a Cloudways demo to tell us your hosting challenges. Hosting plans for Cloudways involve top providers AWSGoogle Compute EngineVultrLinode, and DigitalOcean. With various options, no challenge is too big to overcome.

To edit the upload size limit, log in to your Cloudways account, navigate to Server under the Server Settings & Packages edit the Upload Size field as shown in the screenshot. Don’t forget to click on Save Changes at the bottom of the screen.

upload-size-in-cloudways

Summary

This article provides all possible solutions to increase the maximum file upload size in WordPress. However, some methods may not work on the majority of web hosts. If in case, the above methods do not work with you, the best thing to do is contact your hosting provider. Another option is simply to reduce the size or change the type of the original file – you can use the mxf converter for this. If you know any other methods that I’ve missed, please let me know in the comments.

Frequently Asked
Questions

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

Most hosting providers usually give an option in the server configuration for increasing the maximum upload file size in WordPress. You can read the knowledge base of your hosting provider; if you don’t get the answer, contact your hosting support.

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

This operation belongs to backend settings, but it can affect your site speed if your upload file is not optimized properly. It’s better if you ensure whatever file you upload is optimized and does not make it hard for your users and search engine crawlers to load.

Frequently Asked Questions

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

Most hosting providers usually give an option in the server configuration for increasing the maximum upload file size in WordPress. You can read the knowledge base of your hosting provider; if you don’t get the answer, contact your hosting support.

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

This operation belongs to backend settings, but it can affect your site speed if your upload file is not optimized properly. It’s better if you ensure whatever file you upload is optimized and does not make it hard for your users and search engine crawlers to load.

Speed Up Your Magento Store by 300% Load WordPress Sites in as fast as 37ms! Faster PHP Hosting

0 Comments

Submit a Comment

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

Written by ASRAF MASUM

Internet marketer has over 5 years of traffic generation experience. I'm here to share my knowledge and expertise with you about what I know and what works for me. Basically, I am a Search Engine Optimization Expert, a Social Media Marketer, and a Hard worker.

Related Articles

The7 WordPress Theme Review – It’s Alternative to Xtra Theme?

The7 WordPress Theme Review – It’s Alternative to Xtra Theme?

Reading Time: 15 minutes The7 is vastly different from all existing WordPress Themes in the market, primarily due to its versatility and competitive offerings.The7 works like a charm and is highly trusted around the world.the7 lets you take care of those matters while allowing you to take control of the website with ease. It reduces manpower costs and increases efficiency in any business. Buying The7 is like buying a new experience on the web.

read more

Explore Your Favorite Topics

You can use Discover to get updates for your interests, such as your favorite Categries, without having to search for them. You can customize the types of updates you see in Discover in Our Website or while browsing the web on your phone.

Share This