413 Error WordPress Fix – Request Entity Too Large

Suddenly, you come across a 413 error code: What does this represent? More importantly, how does one fix it? Let's tackle this problem gradually.
This issue arises when your usually uploaded file is very big. Your server has a file size limit. When your upload exceeds this limit, the server blocks it and shows the 413 error.
Method 1 is to crop the upload file size with tasks.php
In your theme's tasks.php file, you can set the upload insistence.
In your WordPress dashboard, navigate to Theme File Editor under Appearance.
Access the functions.php file.
Add this code at the end:
@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );
Approach two: Change the .htaccess file
This method is appropriate for Apache servers.
- Measures:
- Design a file manager for your hosting, an FTP client, or a dashboard.
- Find and reach the .htaccess file located in your site's main folder.
- Include this code at the bottom:
php_value post_max_size 256M
php_value memory_limit 256M
php_value max_execution_time 300
- Restore the file and try once more to upload it.
- This document controls your PHP settings. The approach provides yet another means to enhance limits.
Step 2
- Find the php.ini file either in your root or server directory.
Open it and add these lines:
memory_limit: 512M max_execution_time: 300 upload_max_filesize: 64M post_max_size: Equal to or slightly larger than upload_max_filesize max_input_vars: 3000 display_errors: Off
- Restart your server and save the file, if needed.
- Approach four calls for a plugin.
Step 3
- If you would rather not deal with code, consider using a plugin like WP Increase Upload Filesize.
- Configure the plugin and activate it.
- Go to Settings > Increase Upload File Size. Set your perfect uploading limit.
We’ve also covered how to prevent PHP Files from running in WordPress — take a look!
Summary: Contact your hosting business
Should any of the aforementioned approaches prove ineffective, your hosting provider can assist. Ask them to enhance the upload file density limit for I told them to enhance file size. Usually, they can easily change this for you.
- Revise your functions.php file, .htaccess, or php.ini.
- Use a plugin to change constraints without coding.
- Should it be necessary, contact your hosting support.