Hosting

How to Increase Maximum File Upload Size in WordPress

How to Increase Maximum File Upload Size in WordPress

It’s one of the most common and frustrating errors for any WordPress user: you try to upload a theme, plugin, or media file, only to be met with the dreaded message, “The uploaded file exceeds the upload_max_filesize directive in php.ini.”

This issue is a hard stop that can prevent you from building your site, but the good news is that it’s usually easy to fix. The maximum file upload size isn’t a WordPress setting; it’s a limitation set by your web server. In this comprehensive guide, we’ll show you several simple methods to increase the maximum file upload size and get back to managing your content.

What is the WordPress Upload Limit and Why Does It Exist?

The file upload limit is a safety measure put in place by your web host. Its purpose is to prevent a single user from overloading a server with massive files, which could slow down the server for everyone else.

By default, this limit is often set to a low value (like 2MB or 8MB). While this is sufficient for small images, it’s far too small for high-resolution videos, large plugin files, or premium themes. To fix this, you need to adjust a few server settings.

Before You Start: Check Your Current Upload Limit

Knowing your current limit is the first step.

  1. Log in to your WordPress dashboard.
  2. Navigate to Tools > Site Health.
  3. Click on the “Info” tab.
  4. Expand the “Server” section. Here, you’ll find the “Upload max. filesize” setting, which shows your current limit.

Now that you know your limit, you can choose the best method to increase it.

How to Increase the Maximum File Upload Capacity in WordPress

How to Increase the Maximum File Upload Capacity in WordPress

Method 1: The Easiest Way – Use a Plugin

If you prefer a code-free solution, a simple plugin can do the trick. This is the recommended method for most beginners.

  • Install a Plugin: From your WordPress dashboard, go to Plugins > Add New and search for “Increase Maximum Upload File Size.”
  • Use the Plugin: Install and activate a highly-rated plugin like “Increase Maximum Upload File Size” or “WP Maximum Upload File Size.” These plugins will typically add a new settings page where you can simply enter a new, higher value (e.g., 64M, 128M, etc.) and save the changes.

Method 2: The Most Common Way – Edit Your php.ini File

The most reliable way to increase your upload limit is by directly editing your server’s PHP configuration. Many shared hosting providers allow you to do this via your hosting control panel.

Step-by-Step Instructions for cPanel Users

  1. Log in to your cPanel dashboard.
  2. Find and click on “MultiPHP INI Editor” or “Select PHP Version.”
  3. Find the php.ini File: In the editor, select your website’s domain from the dropdown menu.
  4. Edit the Values: Find the following directives and change their values to something higher, for example, 64M or 128M.
    upload_max_filesize = 64M
    post_max_size = 64M
    memory_limit = 64M
    
    • upload_max_filesize: The maximum size of an uploaded file.
    • post_max_size: The maximum size of data that can be submitted via a form. This should always be equal to or greater than upload_max_filesize.
    • memory_limit: The maximum amount of memory a script can consume. This should be equal to or greater than post_max_size.
  5. Save Changes: Click “Apply” or “Save” to apply the new settings.

Method 3: The Alternative Way – Edit the .htaccess File

If you don’t have access to your php.ini file, you might be able to increase the limit by editing your .htaccess file.

  1. Access Your Site Files: Use an FTP client (like FileZilla) or your cPanel’s File Manager to access your website’s root folder (public_html).
  2. Find and Edit .htaccess: Locate the .htaccess file. If you don’t see it, make sure you have “Show Hidden Files” enabled in your File Manager settings.
  3. Add the Code: Add the following lines of code to the bottom of the file, then save your changes.
    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value memory_limit 64M
    
  4. Check Your Limit: Go back to Tools > Site Health > Server in your WordPress dashboard to confirm the new limit is in effect.

Troubleshooting: What to Do if the Changes Don’t Work

If your upload limit hasn’t changed, here are a few things to check:

  • Check for typos: A single typo in your code can break the entire change. Double-check your file for spelling errors.
  • Contact your host: If you’re on shared hosting, your host may have hard-coded limits that override your changes. In this case, the only solution is to contact their support team and request a higher limit.
  • Check the right file: If you have multiple php.ini files on your server, you may be editing the wrong one. Your hosting provider’s support team can help you find the correct file.

Conclusion

Encountering the “exceeds the maximum upload size” error is a common hurdle, but it’s one that can be overcome with these simple solutions. By editing your .htaccess, php.ini, or wp-config.php files, you can often increase your WordPress upload limit in a matter of minutes. If these methods fail, a quick message to your hosting provider’s support team is all it takes to resolve the issue.

Looking for a reliable hosting provider that makes file management and resource scalability easy? Quape, a leading web hosting and domain company in Singapore, offers high-performance WordPress Hosting solutions designed for speed and flexibility. With Quape, you get the tools you need to manage your website effortlessly, from generous resource limits to expert support. Explore Quape’s hosting plans today and empower your website to grow without limitations.

web hosting plans