WordPress Upload Media error file exceeds the maximum upload size for this site, max 2 MB

Fix “Exceeds the Maximum Upload Size for This Site” in WordPress

Tested in the ShoHost fix lab on 12 October 2026: WordPress 7.1.3, PHP 8.4, Apache with MariaDB 11.8. Every screenshot below is from that lab, not from a customer site.

The Media uploader rejects a file with “exceeds the maximum upload size for this site”. The limit isn’t a WordPress setting. It comes from two PHP values: upload_max_filesize and post_max_size.

WordPress Upload Media error file exceeds the maximum upload size for this site, max 2 MB
A 10 MB photo against a 2 MB limit. The current limit is shown under the upload box.
PHP upload_max_filesize 2M and post_max_size 8M settings
The lab’s limits: 2 MB per file, 8 MB per request.

Fix 1: cPanel MultiPHP INI Editor (recommended)

  1. cPanel → Software → MultiPHP INI Editor → Basic Mode → choose your domain.
  2. Set upload_max_filesize to e.g. 64M, and post_max_size to the same value or higher.
  3. Optionally raise max_execution_time (e.g. 300) for slow uploads, then click Apply.

Fix 2: .htaccess (Apache with mod_php or LiteSpeed)

If your server allows it, add these lines to public_html/.htaccess. This is what we did in the lab. If the site shows a 500 error afterwards, your server doesn’t accept these lines; remove them and use Fix 1.

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
htaccess php_value lines raising upload limits to 64M
The new limits.
WordPress Upload Media succeeds with maximum upload file size 64 MB
Maximum upload file size now reads 64 MB, and the photo uploaded. WordPress automatically created a -scaled version of the large image.

Tips

  • Compress images before uploading. Huge originals slow your site down whatever the limit is.
  • For very large files (videos, backups), upload by FTP or File Manager instead of through the browser.
  • Your hosting plan may cap the maximum value. Ask support if the new limit doesn’t take effect.

Need a hand?

Want someone to do this for you? If your site is on ShoHost, message our support team on WhatsApp at +91 94880 91432 or email [email protected] and we’ll look at the error log with you. Hosting somewhere else and tired of errors like this one? ShoHost WordPress hosting runs on LiteSpeed servers with NVMe storage and free SSL, and includes free migration.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *