---
title: "“Maximum Upload File Size Exceeded” on WordPress Import: 4 Fixes"
url: "https://wpimportexport.com/maximum-upload-file-size-exceeded-wordpress-import/"
description: "Fix the upload_max_filesize error when importing into WordPress: raise the PHP limits, import with WP-CLI, split the file or upload in chunks. Tested."
type: post
published: 2026-11-03T21:40:35+00:00
modified: 2026-11-14T10:40:30+00:00
categories: ["Content Sync"]
tags: ["Abilities API", "AI Agents", "Content Sync", "Import Export by RockStarLab", "staging to production", "WordPress staging"]
docs_topics: ["Import guides"]
---

# “Maximum Upload File Size Exceeded” on WordPress Import: 4 Fixes

The WordPress Importer, and most other import screens, start by uploading a file. When that file is larger than the server allows, the import stops before it begins, with a message about `upload_max_filesize` or with the confusing “File is empty”. We reproduced the error on a test site with a 2 MB limit. Below: which setting is responsible, and four ways around it, from raising the limit to imports that never hit it.

## Short Answer

The limit comes from PHP, not from WordPress. Raise `upload_max_filesize` and `post_max_size` in `php.ini`, `.user.ini` or the hosting control panel, or ask the host to do it. If that is not possible, import from the server’s disk with WP-CLI (`wp import`), which involves no upload, or use an importer that uploads in small chunks, such as the one in [Import Export by RockStarLab](https://wordpress.org/plugins/import-export-by-rockstarlab/).

## The Error, Reproduced

The test site had `upload_max_filesize = 2M` and `post_max_size = 8M`, a common hosting default. The Tools → Import screen of the WordPress Importer shows the limit next to the file field:

![WordPress Importer upload screen showing Maximum size 2 MB next to the file field](https://wpimportexport.com/wp-content/uploads/2026/11/01-wordpress-importer-maximum-size.webp)

_The import screen shows the upload limit next to the file field._

Uploading a 2.2 MB export file from another site was rejected right away:

![WordPress Importer error Sorry, there has been an error. The uploaded file exceeds the upload_max_filesize directive in php.ini](https://wpimportexport.com/wp-content/uploads/2026/11/02-upload-exceeds-limit-error.webp)

_A 2.2 MB file is rejected by the 2 MB limit._

The message, “The uploaded file exceeds the upload_max_filesize directive in php.ini”, names the setting that blocked it.

## Which Setting Sets the Limit

Two PHP settings decide how large an uploaded file may be:

- `upload_max_filesize`: the largest single file PHP accepts.
- `post_max_size`: the largest whole request, file included.

WordPress shows the smaller of the two as “Maximum size”. During the test, one PHP process still had `post_max_size = 1M` from an earlier setting, and the import screen said “Maximum size: 1 MB” although `upload_max_filesize` was 2 MB.

When a file is larger than `post_max_size`, PHP discards the whole request, and WordPress cannot tell that a file was sent at all. The message is then “File is empty. Please upload something more substantial”, followed by a hint that `post_max_size` may be smaller than `upload_max_filesize`. It is the same problem with a misleading first sentence.

## Fix 1: Raise the Limits

Where the settings live depends on the server:

- **Hosting control panel**: many hosts offer a “PHP settings” or “MultiPHP INI Editor” page. This is the safest place.
- **`php.ini`** on servers you manage yourself, followed by a restart of PHP.
- **`.user.ini`** in the WordPress folder, on hosts that run PHP as PHP-FPM or CGI:

```
upload_max_filesize = 64M
post_max_size = 64M
```

Two things the test showed about `.user.ini`. First, PHP reads it only every five minutes by default (`user_ini.cache_ttl = 300`), so the new limit can take up to five minutes to appear, and different PHP processes switch over at different moments. Second, PHP also reads `.user.ini` files in subfolders: a file in `/wp-admin/` overrides the one in the site root for every admin page, including the import screens. In the test, a forgotten `/wp-admin/.user.ini` kept the import screen at 1 MB long after the root file said 8 MB.

On Apache with `mod_php`, the same settings go into `.htaccess` as `php_value upload_max_filesize 64M` and `php_value post_max_size 64M`. On other setups that line causes an error 500, so try `.user.ini` first.

## Fix 2: Import With WP-CLI

When the export file is already on the server, or can be copied there by SFTP, WP-CLI imports it from the disk. No upload takes place, so the upload limit does not apply. With the WordPress Importer plugin active:

```
wp import site-export.xml --authors=skip
```

On the test site, the 2.2 MB file that the upload form rejected was imported this way in 39 seconds, posts and media included. Use `--authors=create` or `--authors=mapping.csv` to control who the posts belong to.

## Fix 3: Split the Export

Tools → Export can export one content type at a time, and posts by category or date range. Several smaller files, each below the limit, import one after the other. It works, but authors, terms and media are spread across the files, and a mistake in one part is easy to miss.

## Fix 4: Use an Importer That Uploads in Chunks

The importer in Import Export by RockStarLab (Free) sends a file to the server in parts of 1 MB and puts it back together there. The upload limit applies to each part, not to the whole file.

For the test, all 868 posts of the old site were exported with the plugin as one JSON file of 3.89 MB, almost twice the 2 MB limit. On the new site, the file uploaded in 5 seconds and the preview showed all 868 rows.

![Import Export by RockStarLab upload step at 100 percent for a 3.89 MB file](https://wpimportexport.com/wp-content/uploads/2026/11/03-plugin-upload-in-chunks.webp)

_The 3.89 MB file uploaded in 1 MB parts despite the 2 MB limit._

The import of all 868 posts then finished in 1 minute 51 seconds with no failures.

![Import result with 868 posts created, 0 failed and a duration of 1 minute 51 seconds](https://wpimportexport.com/wp-content/uploads/2026/11/04-plugin-import-result.webp)

_All 868 posts were imported in under two minutes with a batch size of 50._

For large files, raise **Batch Size** on the import options step. It sets how many rows are processed per step. With the default of 1, the same import ran at about one post every two seconds and would have needed close to half an hour; with 50, it took under two minutes.

Two limits remain. `post_max_size` still has to be larger than one part, so a host with `post_max_size` below about 1.1 MB needs Fix 1 anyway. And the chunked upload is for the plugin’s own files (CSV, JSON, XML, Excel, ODS and its migration packages). A WordPress Importer file (WXR) uploads, but is read as plain XML rather than as posts; import those with WP-CLI. For a whole site, the plugin’s [Content Migration](https://wpimportexport.com/how-to-migrate-only-posts-and-pages-to-a-new-wordpress-site/) packs the content into a compressed ZIP: in another test, 2 MB of posts and pages became a 170 KB package.

## Common Problems and Fixes

### The limit did not change after editing .user.ini

Wait five minutes, then reload. If it is still the old value, look for another `.user.ini` in `/wp-admin/`, and check that the host runs PHP as FPM or CGI; with `mod_php` the file is ignored.

### “File is empty. Please upload something more substantial”

The file is larger than `post_max_size`. Raise `post_max_size` to at least the value of `upload_max_filesize`.

### The upload works but the import stops halfway

That is a different limit: `max_execution_time` or `memory_limit`. The WordPress Importer processes the whole file in one request. WP-CLI has no time limit by default, and importers that work in background batches avoid it as well.

### Error 500 after adding php_value to .htaccess

The server does not run PHP as an Apache module. Remove the lines and use `.user.ini` or the control panel instead.

## FAQ

### Can a plugin raise upload_max_filesize?

Not directly. It is a PHP setting that is fixed before WordPress starts. Plugins that offer to raise it usually write to `.htaccess` or `.user.ini`, which only works on servers that read those files.

### What values are reasonable?

For imports, 64 MB for both settings covers most sites. Set `post_max_size` equal to or larger than `upload_max_filesize`.

### Does the limit also affect exports?

No. Downloading an export file is not an upload. The limit only matters on the site that receives the file.

## Related Guides

- [WordPress Importer not importing images: causes and fixes](https://wpimportexport.com/wordpress-importer-not-importing-images-causes-and-fixes/)
- [WordPress Tools > Export limitations](https://wpimportexport.com/wordpress-tools-export-limitations-what-the-built-in-exporter-doesnt-move/)
- [How to migrate only posts and pages to a new WordPress site](https://wpimportexport.com/how-to-migrate-only-posts-and-pages-to-a-new-wordpress-site/)
- [How to import WordPress blog posts from CSV or Excel](https://wpimportexport.com/import-wordpress-blog-posts-from-csv-excel/)
- [How to use the Jobs Log and schedule import and export jobs](https://wpimportexport.com/how-to-use-jobs-log-and-schedule-wp-import-and-export-jobs/)

Import Export by RockStarLab is free on [WordPress.org](https://wordpress.org/plugins/import-export-by-rockstarlab/).
