How to Fix the ‘413 Request Entity Too Large’ Error in WordPress (7 Easiest Ways)
Some websites have annoying mistakes that make it hard for people to use them. When it comes to your site, things are very different if looking at other sites makes you mad. There are many kinds of website mistakes, some of which are common and some of which are specific to WordPress. One of these is 413.
Error 413 is one of the HTTP 4xx status codes, which tell you about problems with the request that the client made. This post will explain what the “413 Request Entity Too Large” error means and how to fix it in WordPress.
HTTP Error 413 means that the server can’t handle the request because it involves a file, a piece of data, or a group of files that are too big for the server to handle.
Most of the time, the word “413 Request Entity Too Large” shows up in the browser window. This can happen if you try to send files that are too big through your browser, going over the limits set by the webmaster for security or other reasons.
Why do I get the error message “413 Request Entity Too Large”?
Error 413: Request Entity Too Large happens when you try to upload a file that is bigger than what your web server will let you upload. When a user tries to post a file that is too big, the web server sends back an error message saying “413 Request Entity Too Large.”
Depending on the web server and the client, the message shown to the user may be different. Here are some of the most common messages that happen when this mistake happens:
- Mistake 413
- Error 413 in HTTP
- HTTP Status: 413
- Too Big of a Request Entity
- 413. This is wrong.
How to fix the WordPress error “413 Request Entity Too Large”
Error 413 generally happens when you try to upload a big file to your web server and your hosting company has a limit on file size.
When operating WordPress, one of the most common problems is getting the webserver to let files be uploaded through the Media Library. But if your Nginx-powered website isn’t set up to allow big files to be uploaded, the upload process will usually fail.
I’ll show you some of the easiest ways to fix the 413 Request Entity Too Large problem and increase the size of files you can upload in WordPress.
- Change the rights to a file
- Upload the file by hand through FTP.
- Size up the files you can upload
- Change the file called functions.php
- Change the.htaccess file
- Change the nginx.conf file.
- Talk to your hosting company.
- Change a file’s permissionsYou might be getting this error because you don’t have enough access to a file or the right to share it. So, it would be great to check the WordPress file/folder rights, set the recommended permission, and then try to upload the file to your site.You can use an FTP client like FileZilla to set the permissions, and if your hosting company has a way to reset file permissions, you can fix it there.
- Upload the file by hand through FTPIf you want to upload a big file, FTP is a good option. However, if you use FileZilla to upload a file, it will take longer.Here, you’ll need to log in to your web server and drag and drop the file to post it. So, check first with your hosting company to see if they offer server credentials or SFTP access to your web server.
Now, you need the FileZilla FTP Client to view your web files, so download it if you don’t have one. Then, open FileZilla and fill in the Host, Username, Password, and Port boxes as needed. In the image below, you can see that I put in my server’s IP address, Username, Password, and the port number 22.
Next, drag the file you want to put on your website from your local PC (on the left) into the folder on your web server. In my case, the path to the website folder is /applications/dbname/public_html/wp-content/uploads. If you want to add a plugin, go to /applications/dbname/public_html/wp-content/plugins, which is the path to the plugins folder.
- Make files bigger to uploadMany good WordPress hosting services have a tool called “file size settings” that lets users change the maximum upload size, maximum execution time, maximum post size, and other things.Now, let’s look at how to increase the size of the files you can upload from the hosting website. You can change your file upload settings on Kloud Bean through the programme and server settings. From the Application Management panel, I need to remove the comment “;” from three numbers and increase the maximum upload and post size to 256M and the execution time to 300.
php_admin_value[post_max_size] = 256M php_admin_value[upload_max_filesize] = 256M php_admin_value[max_execution_time] = 300
To see if the file size has changed, make an info.php file on your PC and upload it to your website folder using FileZilla. Now, open a file editor like Notebook, copy and paste the code below, and save the file as info.php.
Now, put it in the public_html folder of your site.
The next step is to open your computer and type “www.yoursite.com/info.php” into the address bar. For me, the URL is https://wordpress-675386-2363839.cloudwaysapps.com/info.php. Look for the updated PHP admin values; if the values have changed, the file size has been raised. After that, try to upload your file and see if the problem is still there or if it has been fixed.
If your web host doesn’t have a way to change the size of files you can share, move on to the next method.
- Change the file functions.phpYou can change the functions.php file of your theme to increase the size of files that can be uploaded. But first, you’ll need to make a backup of your whole WordPress site so you can get your info back if something goes wrong. If something goes wrong, you can use backups to get your web files back.To get to your site’s files, you need an FTP Client like FileZilla. So, use FileZilla to connect to your server and then go to the folder for your current theme. The theme files are in the wp-content folder. In my case, the source path is “/applications/enxybqgzgy/public_html/wp-content/themes/twentynineteen”. The next step is to find functions.php and click View/Edit.
Next, copy and paste the code below into your file and save it. This will tell you how many Megabytes is the most you can send. Change the numbers to suit your needs.
@ini_set( 'upload_max_size' , '256M' ); @ini_set( 'post_max_size', '256M'); @ini_set( 'max_execution_time', '300' );
After that, open “www.yoursite.com/info.php” in your browser and check to see if the numbers have been changed. If they have, try uploading your file again.
If this method doesn’t work, try the next one.
- Make changes to your.htaccess fileIf your website is located on LAMP Stack and uses Apache web server and PHP, you can change the maximum file size that can be uploaded by editing the.htaccess file.Again, you need to use an FTP tool like FileZilla to get to your.htaccess file and then go to the public_html folder. If you don’t see the.htaccess file when you look for it, it’s usually hidden. So, go to FileZilla’s settings, click on Server, and then click on Force Showing Hidden Files.
Now Use a code editor or Notepad to open the.htaccess file and add the following lines.
php_value post_max_size 256M php_value memory_limit 256M php_value max_execution_time 300
Choose an appropriate number and size for your site and file. Next, open “www.yoursite.com/infor.php” in your browser to check the new numbers, just like we did in the last step.
- Change the file nginx.confThe above troubleshooting method is for Apache web server. If your website is running on LEMP (NGINX as a web server and PHP), you need to change nginx.conf, which is in /etc/nginx/, and add the following line of code to the file.
http { client_max_body_size 100M; }
- Get in touch with your hosting companyIf you’ve tried all of these things and are still having trouble, you should contact your server support and ask them to fix the problem as soon as possible. Several hosting providers give chat and ticket support around the clock to help their clients.
Conclusion
The size of the client request is tied to Error 413 Request Entity Too Large. This piece told you that there are several ways to fix this error. Most of the time, you can either lower the size of the file or change the web server settings to let you upload a bigger file. If you know of any other ways to fix the HTTP 413 Error, please share them in the comments part below.
Questions People Usually Ask
Q. How do I fix Error 413 Request Entity Too Large?
A. Increasing the highest size of a media file that can be uploaded is the most common way to fix an HTTP 413 error. Resetting file permissions, uploading files with an FTP programme, and changing your files (fuctions.php/.htaccess/nginx.config) are some other ways.
Q. “HTTP Error 413” means what?
A. The user is getting this error because he is trying to send a file that is too big. When a webmaster gets this report, he can ask the user to make the file smaller and try again to share it.