• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

WP Thinker

The WordPress Playground

  • Snippets
  • Best
  • Guides
  • Reviews
Home / Guides

November 15, 2020 Milan

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

413 Request Entity Too Large Error in WordPress

Seeing the 413 Request Entity Too Large WordPress error? We’ll calm down your anxiety right away. Although concerning, it’s not a fatal error like the white screen of death in WordPress. The error commonly occurs when you upload a file that’s over the maximum upload size set in WordPress. This is intentional. That way, you cannot upload plugins, themes, or media files that are too large. This would significantly slow down your website, crash it, or lead to hosting overload. But what if you can’t find an alternative or compress the file enough? That’s why we intend to teach you how to fix the 413 Request Entity Too Large error in WordPress.

A step-by-step guide to solve the 413 Request Entity Too Large error in WordPress

We will assume you tried to compress the file or tried to find an alternative that takes less space. Here are multiple ways to get rid of the 413 Request Entity Too Large WordPress error:

1. Increase the maximum upload file size limit

For this to work, you first need to know how to access your WordPress website via FTP. You’ll need an FTP client or use the cPanel on your hosting website. After that, you can proceed with following the steps to increase the maximum file upload size in WordPress. If you prefer a few other alternatives, mainly installing a WordPress plugin by accessing the WordPress Admin Section, that’s possible too.

2. Can you access your website in Nginx?

If you follow the steps above and still get the error, you also need to configure Nginx (pronounced engine-ex) as well. First, check that your hosting supports it and that you can access it. It’s best if you contact the 24/7 customer support or write a ticket. You’ll need a third-party app, also known as SSH client or SSH Terminal. We recommend PuTTy for Windows, although you can use it on Linux and macOS. Keep in mind that both Linux and macOS have a built-in SSH client called OpenSSH.

To start, check your hosting cPanel to see if there’s an option called SSH Access or SSH Accounts under Advanced. Then look for an option called SSH Details under the Server tab. With these two, you should be able to get all you need – an SSH username, SSH password, Server IP Address, and SSH port. Open the client and log in using this information.

  1. You’ll see a terminal much like Command Prompt, Windows PowerShell, or Terminal on macOS or Linux.
  2. We recommend using the vi text editor. The other options are Nano or Joe’s Own Editor if you seek an alternative.
  3. Type this command in the Terminal:
    vi /etc/nginx/nginx.conf
  4. Now, at the bottom of the file, type:
    # set client body size to 8M #
    client_max_body_size 8M;
  5. You can later increase 8MB if you’re still getting the error.
  6. Save the changes by pressing : (colon) and x then press Enter.
  7. To reload the Nginx after the change, type:
    service nginx reload
  8. You can also try:
    /sbin/nginx -s reload
  9. The error should be fixed now.

3. Fix the problem in Apache

Apache is the most popular webserver and hostings usually combine it with Nginx to get the best of both worlds. Lucky for you, you don’t need to be tech-savvy as you would with Nginx, because Apache checks your .htaccess file for configuration before it processes a request.

  1. Access your website via FTP.
  2. Right-click on the .htaccess file (it will be in the root directory of your website.)
  3. Select View/Edit.
  4. Search for “LimitRequestBody” using Ctrl (Control) + F.
  5. If it isn’t there, and you used method 1 to edit the .htaccess file, add this line underneath those  you added previously:
    LimitRequestBody 104857600
  6. If it was there in the first place, you just need to edit the number.
  7. This is an example that will restrict the request size to 100 Megabits. Feel free to reduce or increase it, based on the size of your files.

Those were the instructions to fix the 413 Request Entity Too Large error in WordPress. If you are scared or overwhelmed by them, it’s best you contact your hosting Customer Support. There’s no shame in asking for help when you need it!

Milan

A WordPress lover and blogger. Have been writing about WordPress for the past few years and loves sharing his knowledge and findings to those who need help.

Primary Sidebar

Related Articles

Footer

WP Thinker is a website that publishes everything related to WordPress, Plugins, Themes, SEO, Blogging, etc.

  • Facebook
  • Twitter
  • Pinterest

Copyright © 2023 · WP Thinker

  • About Us
  • Advertise
  • Write for Us
  • Privacy Policy
  • Terms and Conditions
  • Contact Us
This website uses cookies to serve you better. By continuing to use this website, you agree to our cookie and Privacy Policy.