Family Encyclopedia >> Electronics

How to fix 413 request entity too large error in WordPress

Are you seeing the 413 Request entity too large error in WordPress? This error usually occurs when you try to upload a theme or plugin file to WordPress. In this article, we will show you how to easily fix 413:request request too large error in WordPress.

How to fix 413 request entity too large error in WordPress

What causes WordPress 413 request entity to be too large?

This error usually occurs when you try to upload a file that exceeds the maximum file upload limit on your WordPress site.

Your web server will not be able to load the file and you will see the 413 request entity too large error page.

How to fix 413 request entity too large error in WordPress

Normally, most WordPress hosting companies have their servers set up so that WordPress users can easily upload large images and other media.

However, sometimes this setting is not high enough to load large theme or plugin files.

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

How to fix 413 request entity too large error in WordPress

With that said, let's take a look at how to fix the WordPress 413 request entity too large error.

Fixing the 413 request entity too large error in WordPress

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

Method 1. Increase the upload file size limit via the 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'll also need to increase the max_execution_time to the time you think it will take to load the file. If you are not sure, you can try to double this value.

Method 2. Increase the upload file size limit via the .htaccess 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 

For more information on how to increase the file upload size limit, check out our guide on how to increase the maximum file upload size in WordPress.

Method 3. Manually upload file via FTP

If the 413 error only occurs when you are uploading a particular file, then you may want to consider manually uploading the file via FTP.

If you are trying to upload a WordPress theme, please refer to our guide on how to install a WordPress theme and go to the 'Install a WordPress theme using FTP' section.

If you are trying to upload a plugin, please refer to our guide on how to install a WordPress plugin and go to the “Manually install a WordPress plugin using FTP” section.

For other files, check out our guide on how to manually upload WordPress files using FTP.

We hope this article helped you learn how to fix WordPress request entity 413 too large error. You may also want to see our list of the most common WordPress errors and how to fix them.

If you enjoyed this article, please subscribe to our WordPress YouTube Channel video tutorials. You can also find us on Twitter and Facebook.