Jamsheer K
WRITTEN BY
Jamsheer K
Posted on Jun 26, 2023

Have you ever run into the annoying 413 Request Entity Too Large error? If you have, you know it can make it hard to post or add content to your website.

In this step-by-step help, we will delve into what is causing this error and give you easy ways to fix it, ensuring that you and your website guests have a good time.

413 Request Entity Too Large

Understanding The Causes Of 413 Request Entity Too Large Error

When you try to post or submit content in WordPress that is bigger than the server’s file size limit, you get a “413 Request Entity Too Large” error.

Basically, your server has a maximum size limit for files that can be handled or uploaded. If you try to process or upload a file that is bigger than this limit, you get the 413 error.

Now, let’s look at some of the most common reasons why this error happens.

1. File Size Limit And Server Configuration

The file size limit set by your server configuration is the main thing that causes the 413 error. Web servers like Apache and Nginx often have default settings that limit the highest size of files that can be handled. These limits are in place to ensure that server resources are used efficiently and stop people from abusing them.

2. PHP Settings And Limits On Execution

The file size limit can be affected by server configuration as well as PHP settings. WordPress uses PHP, which is a server-side scripting language with its own set of configuration choices. These settings control how server-side scripts run and can change the size of the biggest file that can be shared or processed.

Troubleshooting Solutions-413 Request Entity Too Large Error

1. Increase File Upload Size By Editing the .htaccess File

One of the main reasons for the 413 error is that the server configuration settings limit the highest file size that can be uploaded. To fix this, it is necessary to locate and change certain files, like .htaccess or php.ini.

You can access your website’s file manager through the control panel of your hosting company or use an FTP client to locate the .htaccess file. Open the .htaccess file once you’ve found it, and add the following code:

php_value upload_max_filesize 124M

php_value post_max_size 124M

php_value max_execution_time 300

php_value max_input_time 300

This code raises the maximum file size to 64 megabytes, extends the maximum processing time, and gives more time for input. Save the changes to the .htaccess file and then upload it back to your server.

2. Editing functions.php File

Modifying the functions.php file of your active theme is another way to increase the file size limit. But it’s very important to be careful and do things the right way to avoid problems. Before making any changes, make a copy of the original functions.php file or a child theme.

To change the functions.php file, go to your WordPress homepage and go to Appearance > Theme Editor. You’ll see a list of theme files on the right. Click “Theme Functions” or “functions.php” to open that file.

editing functions.php file

Add the following code to the end of the file:

@ini_set( 'upload_max_size', '64M' );

@ini_set( 'post_max_size', '64M');

@ini_set( 'max_execution_time', '300' );
editing theme file

Save the changes, and your file size limit should be increased. Remember to remove the added code if you switch to a different theme in the future.

3. Using Plugin Solutions

WordPress plugins can be a simpler option if you’re uncomfortable modifying server settings or theme files. Several plugins are made to handle file uploads and video, so you can get around the problem of file sizes being too big.

One common plugin is called “Increase Maximum Upload File Size.

1. Go to your WordPress homepage and click on Plugins > Add New to install it.

2. Look for “Increase Maximum Upload File Size” and click “Install Now.”

3. Once the plugin is loaded, activate it.

installing required plugins

4. Go to the plugin’s settings and select Upload Max File Size to set up the plugin.

5. Make sure to set up these plugins so they work the way you want them to. It takes precedence over the server settings and makes sure that the file size limit you want is used.

6. Finally, don’t forget to save the settings. 

increase maximum upload size

Most of the time, they have choices that let you choose the limit file size and other options. Use their instructions or support sites if you need help figuring out how to use these plugins well.

4. Upload the File Manually Using FTP

A good way to fix the 413 error is to upload the file manually using FTP (File Transfer Protocol). With this method, you can upload bigger files without being restricted by the server’s file size limitations. Here’s a guide on how to upload a file using FTP:

  1. Choose a program for FTP (File Transfer Protocol) like FileZilla, Cyberduck, or WinSCP, and install it on your computer. These clients make it easy for you to connect to your website’s server.
  2.  Log in to your web hosting account or contact your hosting provider for your FTP login information. You’ll need the server address, username, password, and port number to connect to FTP.
  3. Open the FTP client and type in the FTP server address, username, password, and port number in the correct boxes. Just click on the “Connect” or “Quick Connect” button to connect.
  4. After you connect to your server, the FTP client will show you the folders and files that make up your website. Go to the main folder where WordPress is installed. This is usually the folder called “public_html” or “www.”
  5. Find and open the “wp-content” folder in your WordPress installation directory. You’ll see a folder named “uploads”  inside it. Go to the folder named “uploads” to find where your pictures and videos are saved.
  6. Look for the folder corresponding to the year and month to which you want to upload the file. Once you find the correct folder, you can upload the file there. If the folder is not there, you can make a new one. After you have opened the correct folder, drag the file from your computer and drop it into the FTP client’s window. The document will begin to transfer to the server.
  7. Once the file has finished transferring, look in the FTP client for any error messages or interruptions. After you’ve ensured the file has been uploaded, you can close the FTP client and start using the file on your WordPress website.
Upload the File Manually Using FTP

5. Contacting Hosting Provider

If you don’t want to get into such technical things, or if you have questions about modifying server settings or utilizing plugins, don’t be afraid to contact the support team of your hosting provider. 

They are knowledgeable about server configurations and can help you increase the file size limit or fix any server-related limitations that are causing the 413 error.

When you call the hosting provider’s support, be sure to explain the problem in detail and ask for help.

Be ready to give pertinent details if they ask for specifics about your website and server configuration. Usually, hosting support teams are responsive and eager to assist their customers in overcoming these difficulties.

Conclusion

In the end, getting the 413 Request Entity Too Large error in WordPress can be annoying, but it’s not a problem that can’t be solved. Follow the step-by-step instructions above to raise the maximum file size and get back to adding files and videos to your WordPress site. Whether you choose to change server settings, edit the functions.php file, use plugins, or ask your hosting provider for help, be careful, make backups, and follow best practices to avoid problems.

If your issue is still unresolved, don’t hesitate to get in touch with WPclerks, a WordPress support service providing company. We are available to help by taking care of your one-time tasks and WordPress Support and Maintenance quickly and easily. Forget about hours spent searching for solutions yourself.