Skip to main content

How to Fix 413 Request Entity Too Large Error

In this tutorial, we will show how to fix the 413 Request Entity Too Large error using the Cloudways Platform.

Written by Usama Zafar
Updated over 7 months ago

Table of Contents

The 413 Request Entity Too Large error occurs when you try to upload or make a client request that is too large to be processed by the web server. It also indicates that the web server is configured to restrict large file sizes.

PHP settings such as upload_max_filesize and post_max_size are also common factors that can cause 413 errors if not configured to allow larger uploads.

At Cloudways, Nginx is the upstream web server and sets the HTTP request size. By default, the size of the client request body in Nginx is set to 10 MB. If the request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client. Therefore, we need to tweak the web server settings to allow larger client requests.

Additional configurations like post_max_size and upload_max_filesize in PHP should also match for consistent upload handling.

In this tutorial, we will show how to fix the 413 Request Entity Too Large error using the Cloudways Platform.

While this tutorial provides a basic UI solution, file upload issues may sometimes require advanced troubleshooting involving PHP configuration files.

How to Fix 413 Request Entity Too Large Error

Step #1 — Navigate to Server Settings

Log in to your Cloudways Platform using your email address and password.

  1. From the top menu bar, open Servers.

  2. Then, choose your desired server.

  3. Under Server Management, select Settings & Packages.

Step #2 — Modifying Upload Size

  1. Modify the Upload Size value (in Megabytes) to your preference.

  2. Finally, click Save Changes.

    Tip

    If the file size you want to allow is greater than what we have set, adjust the Upload Size to be greater than the file size.

Advanced Troubleshooting

If the above changes do not resolve the issue:

  1. Verify the absence of syntax errors in PHP configuration files. For example, ensure directives like upload_max_filesize, post_max_size, and memory_limit are correctly uncommented and formatted.

  2. Align post_max_size to be equal or larger than upload_max_filesize to avoid discrepancies.

  3. Review mod-security rules on the server to ensure they do not restrict upload sizes.

  4. Check plugins for specific upload size restrictions. For instance, with some WordPress plugins, you may need to override size restrictions in the code (wp-config.php).

  5. Restart the PHP-FPM service to apply all the changes.

These steps cater to advanced debugging and configuration fine-tuning.

That’s it! We hope this tutorial was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.


With Cloudways’ optimized configurations and proactive server management, you can get rid errors like 413 error for good. Choose our WordPress hosting server and experice a seamless managed hosting environment.

Did this answer your question?