How to fix Error 413 Request Entity Too Large in WordPress


If you encounter the 413 Request Entity Too Large error in WordPress, the most likely cause is that you’re trying to upload a file larger than the maximum file upload limit on your site. This usually happens when uploading a plugin or theme folder using the upload options of your dashboard.


To resolve the issue, you need to increase the max upload size limit on your server. You can ask your server support to increase this or you can add the following code inside your child theme's functions.php file by following the steps below:


  1. Please navigate to WordPress Dashboard> Appearance>Theme Options> Functions.php


  2. Insert the following code at the bottom of your functions.php file below the "// Add your own custom functions here":
@ini_set( ‘upload_max_size’ , ’128M’ );
@ini_set( ‘post_max_size’, ’256M’);
@ini_set( ‘max_execution_time’, ‘300’ );



        3.  Click on Update File.


  


You may also refer to the following article for more details.

https://qodeinteractive.com/magazine/413-request-entity-too-large-wordpress-error