You drag a 64MB theme zip or a raw demo video into your WordPress dashboard, and it immediately chokes: “exceeds the maximum upload size for this site.” Fresh WordPress installs on Hostinger shared servers usually cap out at 32MB, 64MB, or 128MB out of the box. Here is how I bump that ceiling up to 256MB or 512MB in hPanel without breaking PHP processing.

Why WordPress Enforces an Upload Limit
WordPress doesn’t pull this ceiling out of thin air. It simply reports whatever limits PHP and the web server impose on it.
Hosts lock these defaults down to keep rogue plugins or massive concurrent file transfers from chewing through server RAM. If five people hit your site and upload 400MB videos at the same time on a basic shared hosting plan, PHP runs out of memory, drops worker threads, and throws 502 Bad Gateway errors.
Three specific directives dictate what gets through:
- upload_max_filesize: The hard ceiling for any individual uploaded file.
- post_max_size: The total size ceiling for an entire HTTP POST payload (form fields plus attached files). This has to be equal to or larger than
upload_max_filesize. - memory_limit: How much RAM a single PHP process can consume. If this is lower than your file size, PHP runs out of steam before it finishes processing the payload.
If these three aren’t balanced, your upload dies before WordPress can even hand it off to the media library.
Check Your Current WordPress Upload Limit
Before changing configs, check what WordPress currently sees. Log into your WP admin panel and head to Media → Add New Media File.
Right below the dropzone, WordPress tells you: Maximum upload file size: XX MB. For the full breakdown, jump to Tools → Site Health → Info and expand both Media Handling and Server. Look for upload_max_filesize, post_max_size, and PHP memory limit.
If you’re stuck at 64MB and have a 95MB plugin or demo pack to install, that’s your blocker. It’s usually the exact reason a theme demo import failed or got stuck during XML parsing.
Method 1: Change Upload Limits via Hostinger hPanel PHP Configuration
This is the cleanest route on Hostinger. hPanel lets you update directives across the PHP-FPM pool without manually touching system files.
- Log into your Hostinger hPanel dashboard.
- Head to Websites, find your site, and click Manage.
- In the sidebar, scroll down to Advanced and click PHP Configuration.
- Click the PHP Options tab at the top.
Scroll down through the directives and update them to these baseline values:
upload_max_filesize→256M(or512M)post_max_size→256M(or512M)max_execution_time→300max_input_time→300memory_limit→512M
Make sure post_max_size matches or exceeds upload_max_filesize. If you set upload_max_filesize to 256M but leave post_max_size at 128M, any file larger than 128MB will fail silently. Hit Save at the bottom. Hostinger applies the changes to your pool within seconds.
If your plugins process files post-upload (like image resizing or CSV imports), make sure you also increase the PHP memory limit in WordPress so those background scripts don’t crash after the file hits the disk.
Method 2: Update the .htaccess File in File Manager
Hostinger runs on LiteSpeed Enterprise, which reads overrides straight from your .htaccess file just like Apache does.
In hPanel, go to Files → File Manager and open your site’s root directory (typically public_html). Make sure dotfiles are visible, right-click .htaccess, and hit Edit.
Drop this block at the very top of the file, before # BEGIN WordPress:
# Increase PHP upload limits for 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 300Save it. LiteSpeed loads these directives immediately—no server restart required. If your setup has custom per-user tuning, check the LiteSpeed Server Documentation for syntax specifics.
Method 3: Modify the .user.ini File
If you’re running in an environment where .htaccess PHP overrides are ignored, PHP falls back to checking .user.ini in your root directory.
Inside File Manager, check if public_html/.user.ini already exists. If not, create a new file named exactly .user.ini and paste these lines:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 300
max_input_time = 300Save the file. Keep in mind that PHP caches .user.ini directives using user_ini.cache_ttl, which usually takes up to 300 seconds (5 minutes) to clear. If the upload limit doesn’t update right away in WordPress, give it a few minutes or reload PHP in hPanel.
Method 4: Define Constants in wp-config.php
You can also define memory constants inside wp-config.php. While it won’t always override server-level upload limits, it ensures WordPress allocates enough memory when handling the file payload.
Open public_html/wp-config.php, find the line that says /* That's all, stop editing! Happy publishing. */, and add this right above it:
@ini_set( 'upload_max_size', '256M' );
@ini_set( 'post_max_size', '256M' );
@ini_set( 'max_execution_time', '300' );
define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );A quick warning: shared hosts often disable runtime @ini_set calls through disable_functions. If adding this doesn’t change what you see under Media → Add New Media File, stick with Method 1 or Method 2—those run at the server/PHP engine level where they actually stick.
What I Ran and the Gotcha I Fixed
While testing these values on a client’s staging site on Hostinger, I ran into an annoying edge case. I raised upload_max_filesize to 512M in hPanel and confirmed it via PHP Info. But when I tried uploading a 140MB video, the progress bar climbed to 100% and immediately threw a generic HTTP Error.
I opened browser DevTools, checked the Network tab, and caught a 413 Request Entity Too Large response.
The issue? The site was routed through a proxy layer that capped requests before they ever hit LiteSpeed. If your domain passes through an edge proxy or CDN, its client body limits take priority over whatever you set in hPanel.
Also, LiteSpeed uses its own request body buffering. If slow client connections trigger timeouts on large uploads, you’ll need to increase connection timeout limits. And if you recently touched your redirects—like when you resolve WordPress mixed content with LiteSpeed and .htaccess—verify that your rewrite rules aren’t mangling large POST bodies.
Verify the New Limits in WordPress
Once you’ve made your changes, confirm WordPress actually registers them:
- Head to Media → Add New Media File.
- Check the footer text: it should now read
Maximum upload file size: 256 MB(or whatever value you set). - Go to Tools → Site Health → Info → Server.
- Confirm that
Upload max filesizeandPHP post max sizematch your new limits.
For more details on how these configuration hierarchies work together, check the WordPress wp-config.php Documentation and the official PHP Core Directives Manual.
Frequently Asked Questions
Why did my upload limit not change after editing wp-config.php?
@ini_set() only runs if your host allows runtime script overrides. Hostinger runs PHP via LiteSpeed/FastCGI, so server-level directives always override script-level calls. Use hPanel’s PHP Configuration or .htaccess instead.
Can I set the upload limit to 2GB or unlimited?
You can type any number you want, but setting massive limits on shared hosting is asking for trouble. A stalled upload will keep PHP workers tied up for minutes, exhausting connection slots. For files over 500MB, skip the dashboard entirely: upload via SFTP directly to wp-content/uploads/ or use dedicated object storage.
What is the difference between upload_max_filesize and post_max_size?
upload_max_filesize limits the size of a single file. post_max_size sets the ceiling for the whole HTTP request, including form data and multiple attachments. That’s why post_max_size must always match or exceed upload_max_filesize.
Does Cloudflare affect WordPress upload file sizes?
Yes. Cloudflare’s Free and Pro plans enforce a 100MB limit per request at the edge. Even if Hostinger allows 512MB, Cloudflare will drop any file larger than 100MB with a 413 Request Entity Too Large error before it ever reaches your server.
Next Steps
Once your site is handling larger files cleanly, look into your background task handling. Check out how to disable WP-Cron and set up a real cron job in Hostinger hPanel so asset-heavy jobs don’t slow down visitor page loads.

