If you're trying to upload a theme, plugin, or media file and see an error like “file exceeds upload_max_filesize”, your upload limit is too low. In this guide, you’ll learn multiple ways to increase the WordPress upload size limit.
Video Tutorial
Why This Happens
By default, hosting servers limit file upload size for security and performance reasons. Common limits are:
- 2MB
- 8MB
- 64MB
This can block large themes, plugins, or media uploads.
Method 1: Increase Upload Limit via cPanel (Recommended)
Step 1: Open Select PHP Version
- Log in to your cPanel
- Go to Select PHP Version
- Click on Options
Step 2: Update PHP Settings
Change these values:
upload_max_filesize→ 256Mpost_max_size→ 256Mmemory_limit→ 512Mmax_execution_time→ 300
Click Save
Method 2: Edit .htaccess File
- Go to File Manager →
public_html - Find
.htaccess - Add this code:
php_value upload_max_filesize 256M php_value post_max_size 256M php_value memory_limit 512M php_value max_execution_time 300 php_value max_input_time 300
Save the file.
Method 3: Edit php.ini File
- In File Manager, locate
php.ini(or create one) - Add or update:
upload_max_filesize = 256M post_max_size = 256M memory_limit = 512M max_execution_time = 300
Method 4: Increase Limit via wp-config.php
- Open
wp-config.php - Add this line:
@ini_set('upload_max_size' , '256M');
@ini_set('post_max_size','256M');
@ini_set('memory_limit','512M');
Method 5: Contact Hosting Support
If none of the above methods work:
- Your hosting provider may have restrictions
- Ask them to increase upload limits from the server side
How to Verify Upload Limit
- Go to WordPress Dashboard
- Navigate to Media → Add New
- Check the maximum upload size at the bottom
Common Mistakes to Avoid
- Changing only one value (you must update all related limits)
- Setting values too low
- Syntax errors in
.htaccessorphp.ini - Not saving changes properly
Pro Tips
- Set upload limit based on your needs (e.g., 128MB–512MB)
- Avoid extremely high values on shared hosting
- Use optimized images to reduce file sizes
Want Higher Limits Without Hassle?
Some hosting providers restrict upload sizes heavily.
👉 Choose WordPress hosting with higher limits and optimized PHP settings
Conclusion
Increasing the upload size limit in WordPress is simple if you know where to change the settings. Using cPanel is the easiest method, but you have multiple options depending on your hosting environment.