How to Increase WordPress Upload Limit in cPanel

When managing a WordPress website, you might encounter this common and frustrating message:

“The uploaded file exceeds the upload_max_filesize directive in php.ini.”

This happens when you try to upload a file like a large theme, plugin, or media asset and your WordPress upload limit isn’t high enough. But the good news is: if your website is hosted on cPanel, you can easily fix this yourself using one of several methods.
This article will walk you through multiple ways to increase the WordPress upload limit no coding expertise required.

Why the Upload Limit Exists in the First Place

Hosting providers set upload limits in server configuration files to:

  • Prevent abuse or accidental server overload

  • Maintain consistent performance

  • Protect against large file uploads that could crash the server

By default, WordPress might be limited to 2MB, 8MB, or 32MB, depending on the server. But many themes, plugins, or media files exceed these sizes.

How to Check Your Current Upload Limit in WordPress

Before changing anything, first see what your current limit is.

  1. Log into your WordPress Dashboard

  2. Go to Media > Add New

  3. You’ll see a note like:

    Maximum upload file size: 2 MB

This is the value we’re going to change.

Method 1: Update php.ini via cPanel

php.ini is the main configuration file for PHP. Editing it can raise your upload limit directly.

Steps:

  1. Log into cPanel

  2. Open File Manager

  3. Navigate to the public_html folder (or your site’s root directory)

  4. Look for a file named php.ini

    • If it doesn’t exist, create one

  5. Add or edit the following lines:

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

Tip: Make sure post_max_size is equal to or larger than upload_max_filesize, or uploads might still fail.

  1. Save the file and refresh your site.

Method 2: Modify .htaccess File

If php.ini doesn’t work due to server-level restrictions, .htaccess is a great fallback. This file controls various server settings, especially for Apache servers (most common in cPanel hosting).

Steps:

  1. In File Manager, locate .htaccess in your site’s root (public_html)

  2. Make a backup of this file first

  3. Add the following code to the top or bottom:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value memory_limit 128M
php_value max_execution_time 300
php_value max_input_time 300
  1. Save and test by uploading a large file

If your server doesn’t allow overriding PHP values via .htaccess, you might get a 500 error. Just delete the lines to undo it.

Method 3: Use wp-config.php

You can also set limits using WordPress’s own configuration file.

Steps:

  1. In File Manager, open the wp-config.php file in your site’s root folder

  2. Add the following line just before the line that says /* That's all, stop editing! */:

@ini_set('upload_max_filesize', '64M');
@ini_set('post_max_size', '64M');
@ini_set('memory_limit', '128M');
  1. Save the file and check your WordPress Media section again

Bonus Method: Use cPanel’s MultiPHP INI Editor (If Available)

Some cPanel environments offer an interface for editing PHP limits directly, without touching files.

Steps:

  1. Log into cPanel

  2. Open MultiPHP INI Editor (under “Software”)

  3. Select your domain

  4. Modify the following values:

    • upload_max_filesize = 64M

    • post_max_size = 64M

    • memory_limit = 128M

  5. Click Apply

This is the easiest and safest method if your cPanel has it.

How to Test if the New Limit Works

Once you’ve made changes:

  1. Log into WordPress

  2. Go to Media > Add New

  3. You should now see a larger maximum upload size

  4. Try uploading your large file to confirm

If it still fails:

  • Double-check file edits

  • Clear your browser cache

  • Check error logs in cPanel (under Errors)

Best Practices and Tips

  • Only raise limits as much as needed avoid setting values like 512M unless necessary.

  • If you’re uploading videos or large PDFs, consider hosting them externally (e.g., YouTube, Vimeo) to save space.

  • Always keep a backup of php.ini, .htaccess, and wp-config.php before editing.

  • If you’re still limited, your hosting provider might enforce stricter rules. Contact support and request a limit increase.

Final Thoughts

Raising your WordPress upload limit in cPanel is straightforward once you know where to look. Whether you choose the php.ini, .htaccess, wp-config.php, or the MultiPHP INI Editor method, these steps can be performed easily without advanced technical knowledge.
By understanding and applying the correct settings, you’ll never have to worry about “upload_max_filesize” errors again and you’ll have more freedom to build the site you envision.