Skip to content
WampServer logo WampServer
  • Home
  • What is
  • Features
  • Install
  • Compare
  • FAQs
  • Guide
Get WampServer

How to Increase the Upload File Size Limit in WampServer (php.ini)

increase upload file size in WampServer

WampServer can stop you when you try to import a theme, a backup, or a large database file on localhost: "The uploaded file exceeds the upload_max_filesize directive" — or it fails silently with no error at all. That limit is a sensible production default, but on your own development machine it just gets in the way. Raising it takes about five minutes in the right php.ini file.

If you have not set up a local site yet, start with install WordPress on WampServer so you have a real upload to test against. If WampServer itself is not running yet, follow download and install WampServer on Windows first, then come back to this guide.

Why the WampServer Upload Limit Is So Small

PHP ships with conservative defaults. On a typical WampServer 3.x install, upload_max_filesize is often just a few megabytes, and post_max_size is only slightly higher. Yet a premium WordPress theme can be 20 MB, a full site backup can exceed 200 MB, and a database import can be larger still.

Three settings work together to control uploads, and misunderstanding how they interact is the most common reason a fix "does not work":

  • upload_max_filesize — the maximum size of a single uploaded file.
  • post_max_size — the maximum size of the entire POST request, including the file plus all form data. This must be larger than upload_max_filesize.
  • memory_limit — the memory a script can use while processing the upload. This should be larger than post_max_size.

If you raise only the first one, uploads will still fail. All three need to move together, in that order of size.

WampServer php.ini Settings You Need to Change

Use this table as your reference before you edit anything. Pick a target file size first — say 64 MB or 128 MB — then set the values in the correct proportion.

SettingExample ValueRule
upload_max_filesize64MYour target maximum file size
post_max_size80MLarger than upload_max_filesize
memory_limit256MLarger than post_max_size
max_execution_time300Seconds; gives large uploads time to finish

Note that the values use M for megabytes with no space, for example 64M, not 64 MB or 64mb. PHP is strict about this format.

How to Increase Upload File Size in WampServer: Step-by-Step

Step 1: Start WampServer and Confirm the Icon Is Green

Double-click the WampServer shortcut and wait until the tray icon turns green. Green means Apache and MySQL are both running. If the icon is orange or red, fix that first — editing php.ini while services are stopped can mean you edit a file that is not loaded at all.

Step 2: Open the Correct php.ini From the Tray Menu

This step matters more than any other. WampServer can have several PHP versions installed side by side, and each one has its own php.ini. Editing the wrong file changes nothing.

  1. Left-click the WampServer tray icon.
  2. Hover over PHP, then click php.ini [apache module] — or, in some builds, simply php.ini.
  3. The file opens in your text editor. This is the php.ini that Apache actually uses, which is the one that controls uploads to your websites.

Avoid hunting for php.ini manually in C:\wamp64\bin\php\. There is also a separate CLI php.ini for command-line work only; changing that one will not affect browser uploads.

Step 3: Change upload_max_filesize

Press Ctrl+F, search for upload_max_filesize, and change its value:

upload_max_filesize = 64M

If you regularly restore large backups, use 128M or 256M instead. There is no harm in a generous limit on a local machine that only you can access.

Step 4: Change post_max_size and memory_limit

Search for post_max_size and set it higher than the file size:

post_max_size = 80M

Then search for memory_limit and set it higher again:

memory_limit = 256M

Also search for max_execution_time and raise it to 300, so a large upload does not time out even when the size limit is correct.

Step 5: Save the File and Restart All Services

Save php.ini and close the editor. Then left-click the tray icon and choose Restart All Services. Wait for the icon to return to green. A restart is mandatory — PHP reads php.ini only when Apache starts, so without it your new values are ignored completely.

How to Verify the New Upload Limit Worked

Do not assume the change worked. Verify it in one of these two ways:

  1. In WordPress: go to Media > Add New or Site Health > Info > Server to see the current limit.
  2. With phpinfo(): left-click the tray icon, open phpinfo(), and search for upload_max_filesize.

For phpMyAdmin, the "Max: …" figure next to the import file picker should now match your new limit.

What If Uploads Still Fail After Editing php.ini?

Work through this short checklist before changing anything else:

  • You edited the CLI php.ini. Re-open the file through the tray menu as described in Step 2 and check the values there.
  • post_max_size is still smaller. If post_max_size is lower than upload_max_filesize, PHP silently discards the upload. The order must always be memory_limit > post_max_size > upload_max_filesize.
  • You forgot to restart. Left-click the tray icon and select Restart All Services, then re-check with phpinfo().
  • The app has its own limit. Some plugins and phpMyAdmin impose separate caps — check the app's settings once PHP values are confirmed.
  • The wrong PHP version is active. A newly switched version has a fresh php.ini with default limits. Repeat the edit there.

These PHP limits come from PHP, the server-side language that powers WordPress and most of the tools you run on WampServer, which is why the same setting names appear on almost every hosting platform.

Frequently Asked Questions

What is a good upload_max_filesize value for local development?

64M handles most themes, plugins, and medium backups. For full backups or large database imports, use 128M or 256M. On localhost there is no downside to a generous limit, because only you can reach the server.

Do I need to edit php.ini for every PHP version in WampServer?

Yes. Each PHP version folder has its own php.ini, and only the active version's file is loaded. If you switch versions later, repeat the same three changes in the new version, or copy the values across, then restart all services.

Why does phpMyAdmin still show the old maximum import size?

This almost always means Apache was not restarted after the edit, or you edited a different PHP version's file. Restart all services and refresh phpMyAdmin. Also check that post_max_size is larger than upload_max_filesize, otherwise the smaller value wins.

Can I increase the upload limit with .htaccess or wp-config.php instead?

Sometimes, but it is unreliable on WampServer because master php.ini values take priority and several directives cannot be overridden per-directory. Editing php.ini directly is the clean, permanent fix.

Conclusion

Increasing the upload file size in WampServer comes down to one file and three values in the right order: upload_max_filesize at your target, post_max_size larger, memory_limit larger still — then restart all services and verify with phpinfo() or WordPress Site Health. Open php.ini through the tray icon, and theme installs, backup restores, and database imports on localhost become the quick tasks they should be.

WampServer

WampServer simplifies local web development on Windows with essential resources for downloading, installation, configuration, server management, and troubleshooting to ensure a smooth development experience.

Navigation

  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 | WampServer | All Right Reserved

Disclaimer: Not affiliated with WampServer or any other third-party platforms