Does your WordPress website show you the 413 request entity too large error in WordPress? This is one of the common errors you will encounter during your use of the WordPress platform, and it occurs when you attempt to upload files that exceed the upload limit of your WordPress website. In this article, I will be showing you how to fix the 413 request entity too large error in WordPress.
Table of Contents
What is the 413 Request Entity Too Large Error in WordPress
If you receive the 413 request entity too large error in your WordPress website, that is to notify you that the file you are about to upload is larger than your WordPress site’s maximum upload limit.
Cause of the 413 Request Entity Too Large Error in WordPress
This error message is caused by uploading a file that is larger than the maximum upload limit of your site.
This large file will be blocked from your web server, triggering the 413 request entity as too large an error on the website.
This upload limit is being configured by your site’s hosting company and is usually large enough for you to upload most media files.
Sometimes, the issue with this setting is that it isn’t large enough for you to directly upload large plugins or themes files to your website. This upload limit would also prevent you from uploading large images or video files to your website, resulting in the 413 request entity being too large an error.
Now, let’s move to how to fix the 413 request entity too large error in WordPress.
How to Fix the 413 Request Entity Too Large Error in WordPress
There are various ways you can take in fixing the 413 request entity too large error in WordPress, they include:
Increase Your Upload File Limit via Your Functions.php File
Go to your theme’s functions.php file to boost your site’s file upload limit. To do this you will need access to your site’s cPanel. You can access your cPanel using the login information given to you by your web host.
Once you are logged in, go to the File Manager option to get access to files related to your website.
Look for the theme’s functions.php file in the public_html directory. Once you have found the funtions.php file, right-click on it and select the Edit option.
When you open the file, add the following code:
@ini_set(‘_max_size’,’64M’);
@ini_set(‘post_max_size’,’64M’);
@ini_set(‘max_execution_time’,’300’);
This code will increase the maximum size limit for all the posts and uploads on your site. It also boosts the maximum execution time which your server will spend processing the upload request. You can set the number to any value of your choice, but ensure they are large enough to stop the error message.
Increase Your WordPress .htacess File
This configuration is just like the functions.php, but for this method, you will be adding the code to your .htaccess file. You will find the .htaccess file in your public_html directory. If you are unable to find the file in this location, it’s probably in another location or not visible. You can contact your site’s hosting company for assistance.
You have found the .htaccess file, click on it to open it. Go to the bottom and add the following code to it.
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
After adding these codes, save the configuration and go back to your site. This should fix the 413 request entity too large error, and both the maximum upload size limit and the maximum execution time of your website
Upload the File Manually using FTP
If the 413 error message pops up when you are attempting to upload a file on your website, you can connect to your WordPress site using an FTP client and upload the file manually.
If you get the error message while uploading a WordPress theme to your site, you can connect to your WordPress site using an FTP client and upload the theme manually.
If you get the error message while uploading a WordPress plugin to your site, you can connect to your WordPress site using an FTP client and upload the plugin manually.
If the 413 request entity is too large error persists, you should consider contacting your web host for assistance. Outline to them your various setup, and they will tell you what next to do. If their reply isn’t satisfactory, you can switch your site to a new host.