Fix 413 Request Entity Too Large in WordPress on Hostinger

by Fahim

You drag a 65MB custom theme zip or a 250MB backup file into your WordPress dashboard, watch the upload bar hit 100%, and get smacked with a bare-bones 413 Request Entity Too Large error. The upload drops immediately, WordPress writes zero debug logs, and your browser gives up.

I hit this exact wall while migrating a client site onto a Hostinger Business plan last week. Here’s why that 413 status triggers on Hostinger’s LiteSpeed stack, how to bump the limits across all three layers, and how to bypass the web interface entirely when forms keep choking.

Linux terminal showing HTTP 413 Request Entity Too Large curl response and SSH session on Hostinger server
Linux terminal showing HTTP 413 Request Entity Too Large curl response and SSH session on Hostinger server

Where the 413 Error Actually Triggers

A 413 status code means the server killed your connection because the payload in your HTTP POST request was bigger than what the server allows. Per the MDN documentation on 413 Payload Too Large, this gate is entirely server-side—WordPress never gets a chance to process the file.

On Hostinger, your upload hits three separate checkpoints before WordPress ever touches it:

  • The Edge Proxy / CDN: If your domain runs through Cloudflare or Hostinger’s built-in CDN, the proxy inspects request headers first. Cloudflare’s Free tier drops any upload over 100MB instantly.
  • The Web Server (LiteSpeed): Hostinger runs LiteSpeed Enterprise on its shared and cloud plans. LiteSpeed tracks request bodies through directives like LimitRequestBody and internal buffers.
  • The PHP Engine: If LiteSpeed accepts the packet, PHP takes over and checks upload_max_filesize and post_max_size. If your file passes the web server buffer but breaks PHP’s limits, you often get bounced to the link you followed has expired in WordPress instead of a clean 413, though certain LiteSpeed setups dump the connection upfront.

If you get a plain black-and-white “413 Request Entity Too Large” screen without any WordPress dashboard styles, LiteSpeed or your edge CDN killed your upload before PHP was even invoked.

Fix 1: Bump PHP Options in Hostinger hPanel

Hostinger handles PHP configs directly through hPanel, so you don’t need to dig through system-level /etc/php/ files. Before editing code, raise your limits in the control panel.

  1. Log in to Hostinger hPanel.
  2. Navigate to Websites, find your domain, and click Manage.
  3. In the left sidebar, head to Advanced > PHP Configuration.
  4. Click the PHP Options tab.

Scroll down through the directives and update these values:

  • upload_max_filesize: Change to 256M or 512M (defaults are usually 128M).
  • post_max_size: Match or exceed upload_max_filesize (e.g., 256M or 512M). Always keep this rule: post_max_size must be greater than or equal to upload_max_filesize.
  • memory_limit: Set this to 512M so PHP doesn’t run out of memory while extracting theme or plugin archives.
  • max_execution_time: Bump to 300 or 600 so slow client uploads don’t time out mid-stream.
  • max_input_time: Set to 300.

Click Save at the bottom. Hostinger pushes these updates directly to LiteSpeed’s PHP workers without needing a server restart.

Fix 2: Add Direct Directives to .htaccess

Sometimes hPanel values don’t trickle down properly—usually because an old plugin or a previous migration dropped overriding flags in your directory. Because Hostinger uses LiteSpeed Enterprise, it parses standard Apache directives inside your .htaccess file.

Open hPanel’s File Manager (or connect via SFTP) and go to your site root, typically public_html/. Edit the .htaccess file there.

Add this block right at the top, above the # BEGIN WordPress line:

# Increase PHP Upload Limits for Hostinger LiteSpeed
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value memory_limit 512M
php_value max_execution_time 300
php_value max_input_time 300 # LiteSpeed Specific Body Limit
LimitRequestBody 268435456

LimitRequestBody takes values in bytes. The number 268435456 is exactly 256MB (256 * 1024 * 1024). This tells LiteSpeed’s connection pool not to abort the incoming stream before handing it to PHP.

If adding php_value throws a 500 Internal Server Error, delete those lines and keep only LimitRequestBody. That happens when your site runs PHP in FPM mode, which restricts inline runtime values in .htaccess.

Fix 3: Update wp-config.php and Custom php.ini

If your plan restricts php_value in .htaccess, you can define limits directly in your application config or through a local .user.ini file.

Updating wp-config.php

Open public_html/wp-config.php and paste this right above the /* That's all, stop editing! Happy publishing. */ line:

// Allocate sufficient memory for large file processing
@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'memory_limit', '512M' );
@ini_set( 'max_execution_time', '300' ); define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

Keep in mind that runtime calls like ini_set() won’t override upload_max_filesize on all PHP engines once the request has started executing. Dropping a .user.ini file into your root is much more dependable.

Creating a .user.ini File

Inside public_html/, create a file named .user.ini and add these directives:

upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 300
max_input_time = 300

LiteSpeed checks .user.ini on incoming requests or caches it for up to 300 seconds. If the change doesn’t kick in right away, give it five minutes for the FastCGI process cache to reload.

The Cloudflare 100MB Trap (And How to Bypass It)

If you bumped hPanel, updated .htaccess, verified PHP settings, and uploads over 100MB still die with a 413, your problem is Cloudflare.

Cloudflare’s Free and Pro plans hard-cap incoming HTTP POST requests at 100MB. If you upload a 120MB video or a 300MB database export through a proxied domain, Cloudflare rejects it at the edge with its own branded error: 413 Request Entity Too Large (Cloudflare).

You can verify this in seconds with curl from your terminal:

curl -v -F "file=@large-file.zip" https://example.com/wp-admin/async-upload.php

Look at the headers in the output. If you see:

HTTP/2 413
server: cloudflare

Hostinger never even saw your request. Cloudflare killed it before it reached the origin.

How to handle this:

  • Temporarily Grey-Cloud the Record: In your Cloudflare DNS panel, find your root or upload A record, switch the proxy status to DNS Only (Grey Cloud), wait two minutes, and run your upload. Toggle the orange proxy back on when you’re done.
  • Point an Unproxied Subdomain: Create a DNS record like direct.example.com set to DNS-only pointing straight to your Hostinger server IP, and access the WordPress admin from there for major uploads.
  • Use Chunked Upload Plugins: If you’re uploading media files, plugins like “Tuxedo Big File Uploads” split uploads into 5MB chunks via JavaScript. Cloudflare allows every chunk through because no single request crosses that 100MB ceiling.

Bypass Web Uploads Entirely with WP-CLI and SSH

When you’re trying to install an oversized theme or restore a multi-gigabyte backup, web forms are the wrong tool. Browser timeouts, flaky Wi-Fi, and proxy limits will keep breaking your transfer. It’s much cleaner to upload the file over SFTP or SSH and run the install via WP-CLI.

Hostinger includes SSH access on its Premium, Business, and Cloud shared plans. If it isn’t turned on yet, enable it inside hPanel under Advanced > SSH Access.

Connect to your server via your local terminal:

ssh -p 65002 u123456789@your-server-ip.hostinger.com

Upload your archive directly to the server using scp or FileZilla into wp-content/:

scp -P 65002 heavy-plugin.zip u123456789@your-server-ip.hostinger.com:public_html/wp-content/

Once you’re on the server via SSH, run WP-CLI inside your public_html/ directory to install the package directly, bypassing HTTP entirely:

cd public_html
wp plugin install wp-content/heavy-plugin.zip --activate

This completely ignores LiteSpeed’s LimitRequestBody, PHP’s post_max_size, and Cloudflare’s 100MB boundary. If you’re tackling a complete site move, read our walkthrough on how to migrate a large WordPress site to Hostinger using SSH and WP-CLI.

Verify Your New Limits in WordPress Site Health

Don’t test your new settings by waiting 10 minutes on a massive file upload. Check the real limits WordPress sees inside Site Health.

  1. Log in to your WordPress dashboard.
  2. Go to Tools > Site Health.
  3. Click the Info tab and open the Server section.

Confirm these three lines:

  • PHP memory limit: Shows 512M.
  • PHP post max size: Shows 256M or 512M.
  • Upload max filesize: Matches your desired target (e.g., 256M).

If Site Health shows your new limits but large demo imports still hang, your issue is execution timeouts rather than payload caps. Check our guide on how to fix demo content import timeouts to keep long-running scripts from getting killed mid-execution.

Frequently Asked Questions

Why does the 413 error show up even after I increased upload_max_filesize in hPanel?

Usually because post_max_size was left lower than your upload target, or LiteSpeed is dropping the connection before PHP can evaluate the upload. Make sure post_max_size is equal to or higher than upload_max_filesize, and add LimitRequestBody 268435456 to your .htaccess so LiteSpeed allows larger streams.

Can I increase the limit beyond 512MB on Hostinger shared hosting?

You can set the numbers higher, but Hostinger’s process monitors will likely kill any script that holds onto that much memory or execution time on shared plans. For anything over 512MB, uploading via SFTP and extracting through WP-CLI or SSH is far more reliable.

Does Cloudflare’s paid plan remove the 100MB 413 error?

Cloudflare Pro keeps the same 100MB limit. Cloudflare Business steps it up to 200MB, and Enterprise supports 500MB (or custom limits through enterprise sales). On Free or Pro plans, your best option is toggling off the proxy temporarily or using a chunked uploader.

Will updating these limits slow down my WordPress site?

No. Raising upload_max_filesize and post_max_size doesn’t reserve RAM ahead of time. Memory is only allocated dynamically when an actual upload matches that size. If you want to keep background processes from clashing with file imports, see how to replace WP-Cron with a real system cron job on Hostinger.

Next Steps

Once you’ve bumped your limits across hPanel and your server config, test by uploading your theme or plugin package directly through the dashboard. If you’re preparing to transfer a large site over to this stack, check our step-by-step guide on how to migrate a large WordPress site to Hostinger using SSH and WP-CLI to avoid HTTP upload headaches altogether.

Official resources

all_in_one_marketing_tool