How to Increase Media Maximum File Upload Size in WordPress

Getting your Trinity Audio player ready...

Having a low maximum file upload size limit in WordPress can be extremely frustrating, as it prevents you from uploading larger media files and installing larger plugins and themes. If you’re running into this problem, you probably want to increase the max file upload size in WordPress as soon as possible. Fortunately, there are several ways to do this without having to access any server files or settings.

In this article, we will explore seven effective methods to increase the maximum upload size for media files in WordPress, allowing you to handle large images or videos on your website seamlessly.

What Is the Maximum Upload Size for WordPress?

The maximum file upload size for images in WordPress is determined by the hosting service and varies accordingly. The maximum upload size in WordPress typically ranges from 2MB to 150MB, depending on your web hosting settings.

The limit is established by the hosting provider at the server level in order to avoid timeouts. The default upload file size on Cloudways is 10MB. Increasing the file upload size allocation on your website is a feasible solution if it falls short of your requirements.

In the process of website building, it is common to require the uploading of media files such as images, videos, themes, and plugins. Sometimes these files are larger than the maximum upload size set in WordPress. If the ‘php.ini’ file is absent, the server will resort to its predefined default PHP settings.

Increasing the maximum file upload size in WordPress is an important action to take, especially if you are dealing with hefty files that are larger than usual. It can be especially needed when a website has large amounts of media or content like podcasts or videos, which require much bigger data sizes.

In some cases, the default upload limit might be too little and might cause some inconveniences for a website administrator. Therefore, it is highly recommended to increase this setting if your website deals with more intensive types of media on a regular basis.

However, if you need to upload files larger than this limit, then it’s important to increase the maximum file upload size in WordPress. For example, if you run a photography website and need to upload large images or videos, then increasing the upload limit can help prevent any errors caused by too large of file size.

Increasing the limit also allows you to take full advantage of all of your content management capabilities within WordPress. This makes managing your content much easier and gives you greater flexibility regarding what type of files you can add to your site.

Say, for instance, the size of a new theme file exceeds the default limit, uploading it to the site will result in failure. If the PHP variable is set to a low value on your site, the upload will produce the error mentioned earlier. To resolve the problem, it would be necessary to adjust the maximum upload size in WordPress.

Why Increase Maximum File Upload Size in WordPress?

Increasing the maximum file upload size in WordPress can be beneficial for several reasons. One of the primary reasons is to accommodate larger files, such as high-resolution images, videos, and audio files, which are essential for creating engaging content. A higher maximum file upload size can also enable users to upload larger files, such as themes, plugins, and digital products, which can enhance the functionality and user experience of a WordPress site.

Moreover, increasing the maximum file upload size can help to resolve issues related to file upload limitations, such as errors and timeouts, which can occur when trying to upload large files. This can improve the overall performance and stability of a WordPress site, making it more efficient and user-friendly.

Additionally, increasing the maximum file upload size can be necessary for certain types of websites, such as e-commerce sites, which require the ability to upload large product images and videos. It can also be beneficial for websites that require the ability to upload large files, such as documents and presentations.

How to Check the Current Maximum Upload Size in WordPress?

WordPress is a powerful and secure platform for managing your website, so it’s important to know what the maximum file upload size limit is to ensure that you’re not uploading large files which could slow down your website. 

To check the current maximum upload size limit of your WordPress site, follow these steps:

  1. Log in to your WordPress admin panel.

  2. Navigate to WP Admin → Media → Add New.

  3. You will find the current maximum upload size displayed at the bottom of the page.

Checking the maximum upload file size

Knowing how to effectively check the maximum file upload size limit should help you determine if you need to increase or decrease this number depending on what type of content you plan on uploading onto your site.

Different types of content usually require different sizes. For example, uploading lots of images may require a larger file size than audio or other types of content. By familiarizing yourself with this setting, you can configure your WordPress site settings so it best meets the needs of all its users and visitors.

How to Increase File Maximum Upload Size in WordPress?

By default, WordPress sets an upper limit on the max file upload size for media files, which can be too small for some types of content. Fortunately, it’s fairly easy to increase the max file upload size so you can start sharing larger media files with your audience.

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

  1. Updating the .htaccess file.

  2. Editing the functions.php file.

  3. Modify the php.ini file, or create a new file.

  4. Adjust the upload size for Multisite.

  5. Make changes to the wp-config.php file.

  6. Use the Plugin Method

  7. Contact Hosting Provider

Method 1: Updating the .htaccess File

edit .htaccess file

If your web server uses Apache and PHP is set as an Apache module, you can increase the max upload size by adding the following lines of code to your WordPress .htaccess file. Here’s how:

  1. Connect to your server using an FTP client like FileZilla.

  2. Locate the folder where WordPress is installed.

  3. Open the .htaccess file in a code editor or Notepad.

  4. Add the following lines of code to the file:

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

Save the changes and upload the modified .htaccess file back to the server.

Method 2: Editing the functions.php File

theme file editor increase maximum upload file size

Another one of the simplest ways is by registering the theme’s functions.php with code that informs the server-side configuration of your hosting provider about the new file size limit. Adding a line of code to define the upload_max_filesize value will let you specify the maximum file upload size limit for all types of files, including images, videos, and audio files.

If you prefer to edit WordPress theme files instead of the .htaccess file, you can increase the size limits by adding the following lines of code to the functions.php file of your current theme:

  1. Go to your WordPress Dashboard → Appearance → Theme Editor.

  2. Select the Theme Functions (functions.php) file.

  3. Add the following lines of code at the end of the file:

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

Method 3: Creating or Editing the php.ini File

The php.ini file is used to configure PHP applications and contains parameters for file timeout, upload size, and resource limits. If the php.ini file is absent, the server will resort to its predefined default PHP settings. Follow these steps to create or edit the php.ini file:

Access your WordPress root directory using SSH or FTP.

  1. Look for an existing php.ini file. If you can’t find one, you can create a new file.

  2. Open a text editor and create a new file.

  3. Add the following code to the file:

  4. Save the file as php.ini.

  5. Upload the php.ini file to your WordPress root directory using SSH or FTP.

upload_max_filesize = 64M post_max_size = 128M memory_limit = 264M

edit-php-ini-file

Method 4: Increasing Upload Size in Multisite

If you are running a WordPress multisite installation, you can increase the upload size limit from the network settings. Follow these steps:

  1. Access your WordPress admin panel.

  2. Go to Network Admin → Settings → Network Settings.

  3. Look for the “Max upload file size” option.

  4. Increase the value to your desired limit.

  5. Save the changes.

maximum upload size adjustment

Method 5: Modifying the wp-config.php File

Another method to increase the upload size in WordPress is by modifying the wp-config.php file. Here’s how:

  1. Access your WordPress root directory using SSH or FTP.

  2. Locate the wp-config.php file.

  3. Open the file in a text editor.

modify wp-config file

Add the following code to the file, just before the line that says “That’s all, stop editing! Happy blogging.”:

@ini_set( ‘upload_max_size’ , ’20M’ ); @ini_set( ‘post_max_size’, ’13M’); @ini_set( ‘memory_limit’, ’15M’ );

Method 6: Update Using a Plugin

If you prefer a user-friendly approach without dealing with code or file modifications, you can use a WordPress plugin to increase the maximum upload size. One such plugin is the “Increase Max Upload Filesize” plugin.

Here’s how to use it:

  1. Go to your WordPress admin panel.

  2. Navigate to Plugins → Add New.

  3. Search for “Increase Max Upload Filesize” and install the plugin.

  4. Activate the plugin.

increase max upload size plugin

Go to the plugin settings and enter the desired upload size value and save the changes.

add upload file size value

Method 7: Contacting Your Hosting Provider

If you are not comfortable making changes to files or using plugins, or if the above methods don’t work for you, you can always contact your hosting provider for assistance.

Most hosting providers have support teams that can help you increase the maximum upload size for your WordPress site.

Verifying the New Maximum File Upload Size

After increasing the maximum file upload size, it is essential to verify that the new limit is in place. This can be done by checking the Media Library in the WordPress dashboard, where the maximum upload file size is displayed. Alternatively, you can contact your hosting provider to confirm that the maximum file upload size has been increased.

It is also a good idea to test the new maximum file upload size by uploading a large file to your WordPress site. This will help to ensure that the new limit is working correctly and that you can upload files without encountering any errors or issues.

Summary and Additional Tips

Increasing the maximum upload file size in WordPress is an easy task. All it requires is to know where and what commands or tools should be used for the purpose. If you’re stuck with your hosting provider, try other methods such as increasing the size from php.ini or adjusting your .htaccess file if they don’t seem to help. Before going for a different host, try these alternatives first as it might end up being unnecessary.

Apart from that, make sure to keep an eye on memory limit values while increasing file size limits as well; otherwise, you may face undelivered images or files due to exceeded memory limits.

Once all of this has been accomplished, get uploading! Whatever the project may be – building a heavy portfolio site or simply installing a large theme – there should be no issue with WordPress’ maximum upload file size restriction henceforth.

Remember to always make backups of your files before making any modifications, and if you encounter any difficulties, don’t hesitate to seek support from your hosting provider. Additionally, it’s essential to optimize your media files for web usage to ensure faster site loading speeds.

Best Practices and Security Considerations

When increasing the maximum file upload size in WordPress, it is essential to consider best practices and security considerations. Here are some tips to keep in mind:

  • Always back up your WordPress site before making any changes to the maximum file upload size.

  • Use a reputable and reliable hosting provider that offers secure and stable hosting services.

  • Use a secure protocol, such as HTTPS, to encrypt file uploads and protect user data.

  • Limit the types of files that can be uploaded to your WordPress site to prevent malicious files from being uploaded.

  • Use a file upload plugin that offers advanced security features, such as file scanning and validation.

  • Regularly update your WordPress site and plugins to ensure that you have the latest security patches and features.

  • Monitor your WordPress site’s performance and security regularly to detect any potential issues or vulnerabilities.

By following these best practices and security considerations, you can ensure that your WordPress site is secure and stable, and that you can upload files safely and efficiently.

Frequently Asked Questions (FAQ)

How do I increase the upload file size in WordPress?

To increase the upload file size in WordPress, you can modify server files such as .htaccess, php.ini, or wp-config.php. Alternatively, you can use a WordPress plugin like “Increase Max Upload Filesize” or contact your hosting provider for assistance.

What is the maximum file upload size in WordPress?

The maximum file upload size in WordPress varies depending on your hosting provider and server settings. It typically ranges from 2MB to 150MB. You can check your site’s current limit by navigating to WP Admin → Media → Add New.

How do I upload large files on WordPress?

To upload large files on WordPress, ensure that your maximum upload size limit is sufficiently increased. You may need to adjust server settings or use a plugin to accommodate larger files.

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

In a WordPress multisite setup, you can increase the upload size limit by accessing Network Admin → Settings → Network Settings and adjusting the “Max upload file size” option.

What should I do if I encounter upload errors or server timeouts?

If you encounter upload errors or server timeouts, consider increasing the maximum upload size, checking your server’s PHP memory limit, or contacting your hosting provider for further assistance.

By addressing these common questions, you can effectively manage and increase the maximum file upload size on your WordPress site, ensuring smooth and error-free uploads of large media files.

author avatar
Nonofo Joel
Nonofo Joel, Head of Growth at Fine Media, is an inbound marketing expert committed to business innovation and success. He passionately advances human capital development across Africa as a dedicated volunteer on the Lehikeng Board.