How to Fix WordPress 413 Request Entity Too Large Error

Why Does the WordPress 413 Request Entity Too Large Error Occur? Have you ever encountered the 413 Request entity too large error when you try to upload a file in WordPress? If yes, what would you do to solve this…

How to Fix WordPress 413 Request Entity Too Large Error

Why Does the WordPress 413 Request Entity Too Large Error Occur?

Have you ever encountered the 413 Request entity too large error when you try to upload a file in WordPress? If yes, what would you do to solve this problem? If you are looking for a useful method to tackle it, we are here today to help you do that. The 413 error mainly occurs when you upload a file that is larger than the file upload limit on your website. Therefore, in order to fix the WordPress 413 Request Entity Too Large Error, let’s explore today’s blog.

How to Fix the WordPress 413 Request Entity Too Large Error

Adding code to the Functions file

This is the easiest and most effective way to fix this error. All you need to do is go to the theme’s functions.php file or a site-specific plugin. After that, just add the code below:

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

In the code, you can increase the values of upload_max_size and post_max_size so that they are larger than the file you want to upload. Besides that, you can also increase the value of max_execution_time so that the upload has time to finish.

Inserting code into the .htaccess file

If you don’t want to add the code to the functions file, let’s try to insert the code into the .htaccess file.

Now, let’s open the .htaccess file, and at the bottom, simply add the following code:

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

Wrap Up

All in all, we hope that today’s blog helps you fix the 413 error on your WordPress site effectively. If you have any difficulties or questions, don’t hesitate to leave your comment below. We promise we will try to answer you as soon as possible. What’s more, if you are seeking some useful and impressive Free WordPress Themes to renew your site, don’t forget to visit our site.

Build it with a template

Start from a finished design: Joomla templates, WordPress themes or the AI-ready block themes. Every template has a free version and a live demo.

Free download

We'll send the link, setup tips and update notices, and you can reach us anytime through our AI assistant and contact form.

The download starts at once. We email you the link and ask you to confirm your address. Privacy policy.