Why WordPress 413 Request Entity Too Large Error Occurs?
Have you ever met 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 do that. The main cause of the 413 error is when you upload a file that is larger than the file download limit on your website. Therefore, in order to fix the WordPress 413 Request Entity Too Large Error, let’s explore the blog today.
Let’s Fix WordPress 413 Request Entity Too Large Error
Adding code to the Functions file
This is the most effective and easiest 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 are able to increase the values of upload_max_size and post_max_size to be more than the file you want to upload. Besides that, you can also increase the time of max_execution_time so that you can finish the file uploading.
Inserting code into the .htacces 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
All in all, we wish that the blog today will support you to fix the 413 error in your WordPress site effectively. If you have any difficulty or query want to ask, 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.
- How To Make A Name For Your Brand In The Digital Era - August 3, 2022
- 8+ Useful WordPress Gutenberg Form Builder Plugins in 2022 - July 20, 2022
- How to Easily Use WordPress Reusable Blocks - July 18, 2022