How to Increase Maximum Upload File Size in WordPress

If you’re managing a WordPress website, there may come a time when you’ll need to upload a large file, but the default upload limit will stop you. WordPress often has a relatively low maximum upload file size, which can be frustrating, especially when dealing with media-heavy sites or large files. In this blog, we’ll explore multiple methods to increase WordPress’s maximum upload file size.

1. Check Your Current Maximum Upload File Size

Before making any changes, it’s essential to know what your current limit is. Here’s how you can check it:

  • Log in to your WordPress dashboard.
  • Navigate to Media > Add New.
  • Here, you’ll see the current maximum upload size displayed.

Once you know the limit, you can adjust if it’s lower than you need.

WordPress Media Library

2. Update the php.ini File

The php.ini file controls several PHP settings, including the maximum file size. Here’s how to modify it:

  1. Access your WordPress files via FTP or cPanel.
  2. Find the php.ini file in the root folder of your website. If it doesn’t exist, you can create one.
  3. Add or update the following lines:
   upload_max_filesize = 64M
   post_max_size = 64M
   max_execution_time = 300
  1. Save the file and upload it back to your server.

This method works best if your hosting provider allows you to change PHP settings.


3. Modify .htaccess File

If you’re unable to access the php.ini file, you can edit the .htaccess file:

  1. Locate your .htaccess file in the root directory of your WordPress installation.
  2. Add the following code at the bottom:
   php_value upload_max_filesize 64M
   php_value post_max_size 64M
   php_value max_execution_time 300
  1. Save and upload the .htaccess file back to the server.

This method might not work on all servers, but it’s worth a try.


4. Edit WordPress Config (wp-config.php)

Another way to increase the upload limit is through the wp-config.php file:

  1. Open the wp-config.php file from the root directory.
  2. Add the following lines just before the line that says /* That's all, stop editing! Happy blogging. */:
   @ini_set('upload_max_filesize', '64M');
   @ini_set('post_max_size', '64M');
   @ini_set('max_execution_time', '300');
  1. Save and upload the file back to your server.

Make sure to back up your site before making changes to any critical files like wp-config.php.


5. Contact Your Hosting Provider

Sometimes, the limitations come from the hosting provider’s end, and you won’t have access to change the settings. In such cases, it’s best to reach out to your hosting support and request an increase in the file upload limit.


6. Use a WordPress Plugin

If you’re uncomfortable editing files or don’t have server access, you can use a plugin. Here are some popular plugins that allow you to increase the maximum upload size:

The WP Maximum Upload File Size plugin allows you to easily increase the maximum file upload size in WordPress without needing to modify code or server settings. With just a few clicks, you can adjust the upload size limit based on your hosting environment, making it ideal for users who need to upload larger media files, themes, or plugins effortlessly. Perfect for beginners and non-technical users, this plugin helps you bypass server restrictions and enhance your WordPress site’s functionality.

Increase Maximum Upload File Size | Increase Execution Time

The WP Upload Size plugin helps you quickly increase your WordPress site’s maximum file upload limit. It provides an easy-to-use interface for adjusting the upload size, making it perfect for users who need to bypass default server restrictions without manually editing code or server configurations. Whether you’re working with large media files, themes, or plugins, this plugin ensures smooth uploads by allowing you to set custom size limits based on your hosting capabilities. Ideal for both beginners and advanced users looking for a simple solution.

Increasing the maximum upload file size in WordPress is essential for managing large files effectively, whether it’s media files, themes, or plugins. By following any of the methods mentioned above, you should be able to adjust the file size limit according to your needs.

For further optimization, check out our guide on How to Install Autoptimize WordPress Plugin, which can help speed up your website performance and improve overall efficiency.