Jump to content

How to fix - The 413 request entity too large

Recommended Posts

Shazer    2

How to fix -  The 413 request entity too large 

This error usually happens when you are trying to upload a file that exceeds the maximum file upload limit on your WordPress site.

413 request entity too large error example

Normally, most WordPress hosting companies have their servers configured, so that WordPress users can easily upload large images and other media. However, sometimes this setting is not high enough to upload large theme or plugin files.

It would also stop you from uploading large files in media library. In that case, you will see a different message, clearly stating that the file size exceeds maximum allowed limit.


That being said, let’s take a look at how to fix the the WordPress 413 request entity too large error. :blush:

Fixing 413 Request Entity Too Large Error in WordPress

There are multiple ways to fix the request entity too large error in WordPress. We will cover all these methods, and you can try the one that works best for you.

 1. Increase Upload File Size Limit via Functions File

Simply add the following code to your theme’s functions.php file 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 increase the values in upload_max_size and post_max_size to be more than the file you are trying to upload. You will also need to increase the max_execution_time to the time you think it would take for the file to upload. If you are unsure, then you can try doubling this value.

 2. Increase Upload File Size Limit via .htacces File

For this method, you will need to edit the .htaccess file and add the following code 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


Source : WPBeginner

Share this post

Link to post
Share on other sites
titcrunch    283

the problem is many hosting who limit upload max, limit the php at the base of the server and you can set how many value you would that don't work !

the best advice in this case is change hosting ! because same if you can change the upload max you are not sure all parameter who are needed for this, are ok and you are not sure you server can support all requierement for make this download correctly and all time you host when he look you have too many trafic blocked you server ....

is better to have a real host with a real control on php

Share this post

Link to post
Share on other sites
What do you think? Remember the human.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.