How to Fix the WordPress 413 Request Entity Too Large Error

Is the 413 Request entity too large an error in WordPress bothering you? This issue commonly happens when you try to upload a WordPress theme or plugin file. We’ll teach you how to fix the 413: request entity too large error in WordPress in this article.

What Causes the 413 Request Entity Too Large Error in WordPress?

This issue normally occurs when you try to upload a file that exceeds your WordPress site’s maximum file upload limit.

Your web server will fail to upload the file, and the 413 request entity is too large an error page will appear.

Most WordPress hosting firms set up their servers so that WordPress users can upload huge photos and other media with ease.

However, this value may not be high enough to upload huge theme or plugin files in some cases.

It would also make it impossible to upload huge files to the media library. A new notification will appear in that scenario, clearly saying that the file size exceeds the maximum allowable limit.

As a result, let’s look at how to fix the WordPress 413 request entity too large problem.

In WordPress, how to fix the 413 Request Entity Too Large Error

The request entity is too large a problem in WordPress can be fixed in a number of ways. We’ll go over all of these options, and you may pick the one that best suits your needs.

Method 1: Using File Functions to Increase the Upload File Size Limit

Simply paste the code below into the functions.php file of your theme or a site-specific plugin.

@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

You can make upload max size and post max size larger than the file you’re trying to upload by increasing their settings. You’ll also need to increase max execution time to the amount of time you believe the file will take to upload. If you’re still unsure, try double this value.

Method 2: Using the .htacces file to increase the upload file size limit

You’ll need to change the .htaccess file and add the following code at the bottom for this method:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

See our tutorial on how to increase the maximum file upload size in WordPress for additional information on increasing the file upload size restriction.

Method 3: Using FTP to manually upload the file

If the 413 issue only occurs while uploading a single file, you might want to try manually uploading the file over FTP.

If you’re trying to upload a WordPress theme, go to the ‘Installing a WordPress theme via FTP’ portion of our guide on how to install a WordPress theme.

If you’re trying to upload a plugin, go to the ‘Manually install a WordPress plugin using FTP’ portion of our article on how to install a WordPress plugin.

See our guide on manually uploading WordPress files through FTP for more information.

We hope you found this post helpful in resolving the WordPress 413 request entity too large a problem.

Leave a Reply