How to fix the request entity too large 413 error In WordPress?

The HTTP 4xx status codes are used to indicate errors related to client requests. Error 413, also known as the "Request Entity Too Large" error, occurs when a request made by the client involves a file, block of data, or group of files that exceeds the maximum limit the server allows.

When this error occurs, the browser window typically displays the message "413 Request Entity Too Large". This can happen when attempting to upload files that are larger than the limits set by the webmaster for security or other reasons. To fix Error 413 in WordPress, you need to increase the maximum upload limit set on your web server. This article will guide you through the steps to fix WordPress's Request Entity Too Large 413 error.

1. Edit the .htaccess file

The first step is to edit the .htaccess file in your WordPress installation. This file controls various settings for your website and is located in the root directory of your WordPress installation.

To edit the .htaccess file, you must connect to your website using an FTP client or the file manager from the control panel.

To edit the .htaccess file from CPanel's File Manager, please follow the steps below:

Step 1. Log in to your website's cPanel account.

Step 2. Navigate to the "File Manager" option under the "Files" section.

 

Step 3. Select the directory where the .htaccess file is located. If you can't see the .htaccess file, enable "Show Hidden Files" from the top-right corner.

Step 4. Right-click on the .htaccess file and select "Edit" from the context menu.

Step 5. If a pop-up window appears, click on the "Edit" button.

Step 6. Add the following line in the .htaccess file.

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300

Step 7. Click on the "Save Changes" button to save the changes made to the file.

This code sets the maximum file size for uploads to 64 megabytes and increases the maximum execution time to 300 seconds. You can adjust these values as per your requirements.

2. Edit the php.ini file

If the above step does not work, you will need to edit the php.ini file. This file is responsible for controlling PHP settings on your server. To edit the php.ini file, you must connect to your website using an FTP client or the file manager from the control panel.

To edit the php.ini file from CPanel's File Manager, please follow the steps below:

Step 1. Log in to your cPanel account.

Step 2. Navigate to the "File Manager" option under the "Files" section.

 

Step 3. Select the "public_html" folder (or the folder where your website files are stored).

Step 4. Click on the "Settings" button in the top-right corner of the page.

Step 5. Select the "Show Hidden Files (dotfiles)" option and click on the "Save" button.

Step 6. Locate the php.ini file and right-click on it.

Step 7. Select the "Edit" option from the context menu.

Step 8. Add the following lines in the php.ini file and click on the "Save Changes" button.

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

3. Contact Your Hosting Provider:

If you're uncomfortable with modifying server configuration files or need help with any of the above steps, contact your hosting provider's support team for assistance. They may be able to provide you with specific instructions or make the necessary changes for you.

Conclusion

The Request Entity Too Large 413 error can be easily fixed by adjusting some settings in your WordPress installation. By following the steps outlined in this article, you can increase the maximum file size limit and upload files, images, and videos to your website without any issues.

 


Was this answer helpful?

« Back

chat