Troubleshooting

Fix “413 Request Entity Too Large” Error

What it means

The "413 Request Entity Too Large" error appears when you try to upload a file that's bigger than your web server allows. This commonly happens when uploading a large plugin zip, a theme, or a media file.

Fix 1 — PHP settings (php.ini)

If your host gives you cPanel:

  1. Open cPanel → MultiPHP INI Editor (under Software)
  2. Pick your domain from the dropdown
  3. Adjust these values: – max_execution_time300upload_max_filesize64Mpost_max_size64M
  4. Save

Fix 2 — .htaccess

If you can edit .htaccess directly:

  1. Open cPanel → File Manager (or connect via FTP)
  2. Find .htaccess in your WordPress root
  3. Add these lines at the bottom:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
  1. Save

Fix 3 — theme functions.php

If neither of the above is available:

  1. Open your active theme's functions.php
  2. Add at the end of the file:
@ini_set('upload_max_size', '64M');
@ini_set('post_max_size', '64M');
@ini_set('max_execution_time', '300');
  1. Save

Caveat: functions.php-based limits reset if you switch themes. Use one of the other methods if you anticipate changing themes.

Still seeing 413?

The error is being generated upstream of WordPress:

  • CDN limits — Cloudflare, BunnyCDN, etc. have their own request-size caps. Check their dashboard.
  • Host plan limits — some shared hosts cap upload size regardless of PHP. Contact support and ask them to raise it.

Always back up first

Whatever method you choose, back up the file you're editing before making changes so you can roll back.

Was this article helpful?


© Copyright 2024, All Rights Reserved