How to Fix the 413 Request Entity Too Large Error in WordPress?

How to Fix the 413 Request Entity Too Large Error in WordPress?

Are you a WordPress user and get the “413 Request entity too large” unfortunately? So read this article!

What is the Cause of 413 Request Entity Too Large Error?

When a user tries to upload a large size file and media in the WordPress. Then in response, the web server sends you an error that the entity exceeds the maximum upload limit. Commonly, the hosting server of WordPress has configured their server. Besides that, the user can easily upload the large size media and images in the WordPress.

Furthermore, but in the case of uploading a large size theme and plugins. This setting does not work and create an error “413 Request Entity Too large”.

Request Entity too Large

Method to Fix the Entity Too Large Error

1. Increasing upload file size by function file in cPanel.

2. By increasing upload file size with .htacces file.

3. By increasing upload file size via WordPress file.

4. Edit the upload file size using the php.ini file.

5. Manually upload the file via FTP.

Method 1) Increasing Upload File Size by Function File in cPanel

1. Go to cPanel and open file manager.

2. Navigate to WordPress theme folder( wp-content/themes).

3. Next, select the functions.php file.

Download Function.php File

4. Lastly open the file in your text editor.

5. Scroll down the file and search the line:

* That’s all, stop editing! Happy blogging. */

6. Finally, add the code before it.

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

Method 2) By Increasing Upload File Size with .htacces File

Another method to remove this error is to modify your .htacces file.

1. Download the .htaccess file from the cPanel.

Edit htaccess File

2. Search the line # END WordPress in the file and add the code after 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

Method 3) Edit the Upload File Size using the php.ini File

If you still facing the problem even using the above method. Then you should edit your php.ini file in the root directory.

1. First of all go to Mamp, Xampp and Wamp folder.

2. Then open the php.ini file and add the code.

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Method 4) Manually Upload the File via FTP

Sometimes if you are uploading a large size plugin or theme, then the error entity too large occurs on your screen. So for this upload the large size plugin and theme via FTP.

1. Firstly, download the zip folder of plugin and theme.

2. Extract zip file will create a new folder with the same name.

3. Now manually upload this folder to the website by FTP.

For Uploading Plugins:

Access the path /wp-content/plugins/ and upload the folder extracted from the zip file.

Uploading Plugins from wp-Content Folder

For Uploading Themes:

Access the path /wp-content/themes/ and upload the folder extracted from the zip file.

Uploading Theme from wp-Content Folder

That’s all I hope this article will help to know that how to fix 413 Request Entity Too Large Error in WordPress.