What Causes WordPress 413 Request Entity Too Large Error?
This error usually happens when you are trying to upload a file that exceeds the maximum file upload limit on your WordPress site.Your web server will fail to upload the file, and you will see the 413 request entity too large error page.
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.
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.Method 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.
1 2 3 | @ ini_set ( 'upload_max_size' , '64M' ); @ ini_set ( 'post_max_size' , '64M' ); @ ini_set ( 'max_execution_time' , '300' ); |
Method 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:
1 2 3 4 | php_value upload_max_filesize 64M php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300 |
Method 3. Manually Upload File via FTP
If the 413 error only occurs when you are uploading one particular file, then you may want to consider uploading the file manually via FTP.
If you are trying to upload a WordPress theme, then see our guide on how to install a WordPress theme and jump to the ‘Installing a WordPress theme using FTP’ section.
If you are trying to upload a plugin, then see our guide how to install a WordPress plugin and jump to ‘Manually install a WordPress plugin using FTP’ section.
For other files, see our guide on how to manually upload WordPress files using FTP.
We hope this article helped you learn how to fix the WordPress 413 request entity too large error. You may also want to see our list of the most common WordPress errors and how to fix them.
0 Comments