📤 Increase PHP File Upload Size in WordPress (Apache2)
By default, WordPress running on Apache + PHP limits file uploads to 2 MB.
That’s fine for icons—but not for high-quality images, videos, or modern content workflows.
Let’s fix that. 🚀
⚙️ The Solution
You can increase the upload limit directly from your .htaccess file.
📍 Location:
Your WordPress root directory (same level as wp-config.php)
✏️ Update .htaccess
Append the following lines to the bottom of the file:
🔍 What These Settings Do
-
upload_max_filesize→ Maximum size of a single uploaded file 📦 -
post_max_size→ Maximum total size of all POST data (must be ≥ upload size) 🧮
Both values should always match or post_max_size should be higher.
âś… Final Result
âś” Upload larger media files
âś” Fewer WordPress upload errors
✔ Better support for high-quality content 🎥📸
⚠️ Notes & Gotchas
-
This works only if PHP is running as an Apache module
-
If you’re using PHP-FPM, these values must be set in:
-
php.ini -
or your pool config
-
-
Some hosts override
.htaccesssettings—check with your provider if changes don’t apply

