You can increase the file upload size in your Hostinger VPS site by editing the PHP configuration file (php.ini). This covers changing two key values: upload_max_filesize and post_max_size. The process takes around 10 to 15 minutes and requires either SSH access or the Hostinger file manager.
You do not need advanced server administration skills, but you should be comfortable editing text files.
This guide walks you through three methods: using the Hostinger hPanel PHP settings interface (easiest), editing php.ini via the file manager, or making the change over SSH. It also covers related settings like memory_limit and max_execution_time, troubleshooting common errors, and what to watch out for.
| Detail | Value |
|---|---|
| Time required | 10–15 minutes |
| Difficulty | Beginner–Intermediate |
| What you need | Hostinger VPS plan login; SSH credentials (optional); file manager access |
| What you will achieve | The file upload size limit for your website will be increased to a value you choose (e.g., 128MB, 256MB) |
Before you start
- Your Hostinger VPS must be active and running. Check that you can log in to hPanel.
- Know which PHP version your site uses (e.g., 8.0, 8.1). You can find this under Advanced → PHP Configuration in hPanel.
- Decide on a new upload size. Common choices are 64MB, 128MB, or 256MB. Avoid going above 512MB unless your application genuinely needs it, because it increases memory pressure on your server.
- Have your SSH credentials ready if you plan to use the terminal method. You get these from VPS → Manage → SSH in hPanel.
- If your site uses a caching plugin (e.g., WP Rocket, W3 Total Cache), temporarily disable it while making these changes to avoid cached configs interfering.
How To Increase File Upload Size In Hostinger Vps Site, step by step
Method 1: Using hPanel PHP Configuration (recommended for most users)
This method requires no command-line skills and works on any Hostinger VPS plan that includes the “PHP Configuration” tool.
Step 1: Log in to hPanel
Go to hostinger.com and sign in to your account. You land on the hPanel dashboard.
Step 2: Go to the PHP Configuration page
In the left sidebar, click Advanced. Then select PHP Configuration.
If you don’t see “PHP Configuration” under Advanced, your plan may use a different panel layout. Try searching for “PHP” in the hPanel search bar at the top.
Step 3: Select the correct PHP version
A dropdown menu shows the PHP versions installed on your VPS. Choose the one your site uses. The default is often the latest stable version.
Step 4: Increase upload_max_filesize
Scroll down to the upload_max_filesize row. Click the edit icon (a pencil or two boxes). Enter your desired value, e.g., 128M (with the letter M for megabytes).
Save the change.
Step 5: Increase post_max_size
Find the post_max_size row. This value must be equal to or larger than upload_max_filesize. If your upload limit is 128MB, set post_max_size to 130M or 256M.
Save the change.
The post_max_size covers the total size of a POST request, including form fields and file attachments. If it is smaller than upload_max_filesize, uploads will fail even if the file itself is under the limit.
Step 6: Adjust memory_limit (optional but recommended)
Locate the memory_limit setting. Set it to at least twice your target upload size to avoid PHP memory exhaustion during file processing. For a 128MB upload, use 256M.
Save.
Step 7: Increase max_execution_time (optional)
If you upload very large files (over 200MB), increase max_execution_time to 300 (seconds) or higher. This prevents scripts from timing out. Save.
Step 8: Restart PHP-FPM (if needed)
Some Hostinger VPS plans apply changes automatically. Others require a restart. Look for a Restart PHP button at the top of the PHP Configuration page, or go to VPS → Services → PHP-FPM and click restart.
Wait about 30 seconds.
Wait time: 30, 60 seconds. The PHP service reloads, and your new limits become active.
Step 9: Verify the change
Create a simple PHP file (test.php) with <?php phpinfo(); ?> and upload it to your site’s root directory. Open that file in a browser and search for “upload_max_filesize”. Confirm the value matches what you set.
Delete test.php after checking.
Method 2: Using the Hostinger file manager (no SSH)
Use this method if you prefer a graphical interface or if the PHP Configuration tool is not available on your VPS plan.
Step 1: Log in to hPanel
Same as Method 1.
Step 2: Open the file manager
Click Files → File Manager in the left sidebar.
Step 3: Navigate to the PHP configuration file
In the file manager, go to the root directory of your website (usually /home/username/domains/yourdomain.com/public_html or /home/username/public_html). Look for a php.ini file. If it does not exist, create one.
Step 4: Edit php.ini
Right-click the file and select Edit. Add or modify these lines:
upload_max_filesize = 128M
post_max_size = 130M
memory_limit = 256M
max_execution_time = 300
Replace 128M with your desired value. Save the file.
Step 5: Restart PHP-FPM
Go to VPS → Services → PHP-FPM and click restart. Alternatively, use the Restart PHP button in the PHP Configuration page.
Step 6: Verify the change
Use phpinfo() as described earlier to confirm the new limits are active.
Method 3: Using SSH (advanced users)
This method gives you direct control but requires basic command-line comfort.
Step 1: Connect to your VPS via SSH
Open a terminal (Linux/macOS) or use an SSH client like PuTTY (Windows). Use the credentials from hPanel:
ssh username@your_vps_ip
Step 2: Locate the PHP configuration file
Run php --ini to find the path to your loaded php.ini file. The output shows something like /etc/php/8.1/cli/php.ini and /etc/php/8.1/apache2/php.ini. For web server settings, use the Apache or FPM version (e.g., /etc/php/8.1/fpm/php.ini).
Step 3: Edit the correct php.ini
Open the file with a text editor like nano:
sudo nano /etc/php/8.1/fpm/php.ini
Replace the version path with your actual PHP version.
Step 4: Change the values
Use Ctrl+W to search for each directive. Modify them:
upload_max_filesize = 128M
post_max_size = 130M
memory_limit = 256M
max_execution_time = 300
Save the file (Ctrl+O, then Ctrl+X in nano).
Step 5: Restart the PHP-FPM service
Run:
sudo systemctl restart php8.1-fpm
Replace 8.1 with your PHP version.
Step 6: Verify
Use phpinfo() or run php -i | grep upload_max_filesize on the command line.
Important: Do not set upload_max_filesize higher than the available memory on your VPS. A VPS with 1GB RAM can handle a 128MB upload limit comfortably. Pushing it to 512MB on a small plan may cause out-of-memory errors.
Check your VPS resources in hPanel under VPS → Statistics.
Important: If you use a content delivery network (CDN) like Cloudflare, the CDN may have its own upload size limit (e.g., 100MB by default). If you need larger uploads, you must also adjust the CDN settings or bypass it for those uploads.
Wait time after restart: The PHP service restarts in about 10, 30 seconds. Uploads using the old limit may fail until the restart completes. Plan accordingly.
What to do if something goes wrong
Problem: The upload still fails with an error like “The uploaded file exceeds the upload_max_filesize directive in php.ini”
Fix: You likely edited the wrong php.ini file. Double-check which PHP configuration file your web server is using by running phpinfo() and looking for “Loaded Configuration File”. Compare that path to where you made changes.
If you edited a php.ini in your site’s root, ensure it is actually being read (some VPS setups ignore per‑directory php.ini). Use the hPanel PHP Configuration tool instead, which always works.
Problem: After increasing the limit, the site returns a blank page or a 500 Internal Server Error
Fix: The new values may be too high for your VPS resources. Revert the changes by lowering memory_limit or upload_max_filesize. If you edited via file manager, restore the backup copy (File Manager keeps a trash or you can re‑upload the original).
If you edited via SSH, use nano to set the values back to default (usually 2M or 8M). Then restart PHP. Check the PHP error log: in hPanel go to Advanced → Error Logs to see the exact cause.
Problem: The change seems to work but resets after a VPS reboot
Fix: You may have edited the php.ini for a different PHP version, or a system update overwrote your custom file. Use the hPanel PHP Configuration method instead of a raw file edit, Hostinger’s interface stores the values in a persistent custom configuration that survives updates.
Problem: You need to increase upload size for a specific directory only (e.g., /wp-admin) without affecting the whole site
Fix: Create a .user.ini file inside that directory with the same directives. However, this approach has limited support on VPS environments. Test it thoroughly.
Hostinger’s help center provides instructions for .user.ini if needed.
What happens next
Once the upload size limit is increased, your site can handle larger file uploads through forms, media libraries, and admin panels. WordPress users will see the new limit in Media → Add New. For custom PHP applications, the $_FILES array will no longer reject files up to your chosen size.
Remember that upload speed depends on your internet connection, not the server limit. A 256MB file still takes time to transfer. If you notice slow uploads, consider chunking the files on the frontend.
If you run into issues with other PHP settings (like max_input_time or max_file_uploads), check the same php.ini file, most are adjustable.
Looking for a VPS plan that handles large uploads well from the start? Hostinger offers VPS plans with generous default limits and easy scaling. If you’re not already a customer, you can get started with a significant discount and a free domain to reduce your initial costs.
Frequently asked questions
Can I increase file upload size in Hostinger VPS without using SSH?
Yes. Use the hPanel PHP Configuration tool as described in Method 1, or edit php.ini through the file manager (Method 2). Both require zero SSH knowledge.
What is the maximum upload size allowed in Hostinger VPS?
There is no hardcoded maximum in the VPS itself; it is limited by your server’s RAM and PHP memory limit. Most users set it between 64MB and 256MB. Going beyond 512MB requires careful tuning of memory_limit and post_max_size.
Does increasing uploadmaxfilesize affect site performance?
It can, if you also increase memory_limit too high or allow many concurrent large uploads. Each upload consumes PHP memory until the request finishes. On a low‑spec VPS (e.g., 1GB RAM), setting upload_max_filesize to 512MB may cause memory exhaustion under load.
Monitor your VPS resource usage in hPanel after changing the value.
Can I increase upload size via .htaccess on a Hostinger VPS?
No, .htaccess directives like php_value upload_max_filesize 128M only work on Apache with mod_php enabled, which is uncommon on modern VPS setups. Hostinger VPS usually runs PHP‑FPM, which does not read .htaccess for PHP settings. Use the php.ini or hPanel method instead.
If you are planning to move your site to a Hostinger VPS or upgrade your current plan, take advantage of the current offer to save on your first term and receive a free domain. It covers the setup process and gives you access to 24/7 support if you run into any configuration questions.
Conclusion: Increasing the file upload size on your Hostinger VPS site is a straightforward task when you follow the correct method. Use the hPanel PHP Configuration tool for the simplest experience. If you need more control, editing php.ini via file manager or SSH works just as well.
Always verify the changes with phpinfo() and monitor server resources afterward. With the new limit in place, your site can handle larger media files, document uploads, and backups without hitting the default restriction.
This page contains affiliate links. If you purchase Hostinger hosting through the links on this page, we may earn a commission, at no extra cost to you.




