What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Most WordPress imports fail for one of six reasons: the WXR upload exceeds a PHP limit, PHP runs out of memory, the request times out, the XML is malformed, attachments cannot be fetched, or an earlier attempt imported only part of the data. The safest fix is to identify the error class first, back up the destination, change only the matching limit or import method, and inspect the site before trying again.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
This guide explains what each message means, which access you need, when to split a WXR file, and when the command-line importer is safer than the browser screen.
As an Amazon Associate I earn from qualifying purchases.
Start with a safe diagnosis
Do not immediately click Import again. A WordPress import can create posts, pages, users, terms, and media before it stops. The Administration Handbook warns: “When you resolve the error and try again, you may create duplicate data.” Treat every failed run as a potentially partial migration.
- Back up the destination. Take a database backup and, if media has already arrived, a files backup. A host snapshot is useful if your provider offers one.
- Copy the exact error text. “The uploaded file exceeds the upload_max_filesize directive,” “Allowed memory size exhausted,” a gateway timeout, and “There was an error when reading this WXR file” point to different remedies.
- Record what arrived. Check posts, pages, authors, categories, tags, custom taxonomies, comments, and Media Library items. Note the newest imported date or the last visible item so you can compare after a retry.
- Confirm the input type. The standard WordPress Importer expects a WordPress eXtended RSS (WXR) XML export, not a database dump, JSON file, or arbitrary XML document.
Make a copy of the original export before editing or splitting it. If the source export is incomplete or damaged, changing server limits will not repair it.
Verify that the WXR file is complete and readable
A valid WXR export contains WordPress channel data such as authors, terms, posts, pages, comments, and attachment references. The importer must be able to read the XML from beginning to end. A truncated download, an invalid character, an unclosed tag, or a file that is not actually WXR can cause a parser failure before any useful import occurs.
Signs of malformed or wrong input
- The importer immediately reports “There was an error when reading this WXR file.”
- The upload completes, but the importer stops while parsing rather than while fetching media or creating records.
- A text editor shows an abrupt ending, an XML error, or content unrelated to a WordPress export.
- Only a tiny fraction of the expected records appears even though server limits are generous.
Repair procedure
- Export the content again from the source site, allowing the export to finish and downloading the resulting file again if the first download was interrupted.
- Open the regenerated file with an XML-aware validator or parser. The goal is to find malformed XML, not to alter WordPress content by hand.
- If the export contains invalid XML, fix the source data or regenerate the export rather than repeatedly submitting the same file.
- Test the clean file on a staging destination when possible. Keep the original failed file for comparison and troubleshooting.
Repeated retries cannot make malformed XML valid. If a validator identifies a broken character or tag, correct the source and produce a fresh WXR.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Fix “file too large” and upload-limit errors
Upload errors occur before the importer can process the content. PHP compares the file with two different limits: upload_max_filesize limits an individual uploaded file, while post_max_size limits the entire HTTP POST request. The WordPress.org FAQ states that post_max_size must be larger than upload_max_filesize.
Check the limits as a pair
| Setting | What it controls | Illustrative value published by WordPress.org (2018) |
|---|---|---|
upload_max_filesize |
Largest single file PHP accepts in an upload | 100M |
post_max_size |
Total size of the POST request, including the file | 200M |
memory_limit |
Memory available to a PHP process | 300M |
max_execution_time |
Maximum execution time configured for a PHP request | 600 seconds |
These numbers are examples from a 2018 FAQ, not universal recommendations or a guarantee that an import will complete at those values. A WXR that fits under the upload limit can still exhaust memory or time out while being processed.
Rank #2
Raise limits only where you are allowed
- Check the effective PHP values in your host’s control panel or a site diagnostic screen; the value in a local
php.inimay not be the value used by the web server. - Where your hosting plan permits it, raise
upload_max_filesizeand setpost_max_sizehigher than it. Allow room for the rest of the request rather than making both values identical. - Apply the change using the method your host supports: a permitted PHP configuration file, a hosting control panel, or a managed-hosting support request.
- Retry only after verifying the effective values and confirming that the destination backup is current.
Shared and managed hosts may block per-site changes. Do not edit configuration files that your plan does not permit; ask hosting support to raise the limits for the migration window instead.
When the file cannot be made to fit
Split the export into several smaller, valid WXR files. Prefer separate exports by date range, author, post type, or another boundary that the source exporter can create. If you use an XML-splitting utility, each part must preserve the WXR structure and remain independently readable. Import the parts one at a time and record which ranges have completed.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix “Allowed memory size exhausted”
The WordPress Importer README explains that a very large export can exceed the host’s configured PHP memory limit. Parsing XML, building post data, processing taxonomies, and handling attachment metadata all consume memory; a file below the upload limit is not necessarily small enough for the importer.
If you control PHP configuration
- Confirm the fatal error names the PHP memory limit and shows the amount requested or exhausted.
- Increase
memory_limitthrough the supported configuration method, then verify the new effective value from the destination site. - Run the import in a low-traffic window if the host applies configuration changes after a restart or cache refresh.
- Keep the WXR backup and inspect the destination before any second attempt.
Increasing memory is a capacity change, not a data repair. If the XML is malformed, the same import will still fail; if the host caps memory, a local setting may have no effect.
Rank #3
If the host will not raise memory
Ask the host whether it can perform the import or temporarily raise the limit. Otherwise, break the export into smaller WXR files and process them sequentially. Smaller files reduce the peak memory requirement, although attachment downloads and image processing can still be expensive.
Fix execution-time and gateway timeouts
“Maximum execution time exceeded,” a blank response, or a proxy and gateway timeout generally means the browser request lasted longer than PHP, the web server, or an intermediary allows. The import may have continued long enough to create records before the connection ended, so a timeout does not prove that nothing happened.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallBrowser-based remedies
- Raise
max_execution_timewhere your host allows it. The illustrative WordPress.org FAQ value is 600 seconds; it is not a required setting. - Split the WXR into smaller jobs so each browser request has less work.
- Reduce attachment and image-processing work when the destination already contains the media or when you can copy media separately.
- Check the server and proxy timeout values with the host; PHP can be allowed to run longer while a reverse proxy still closes the connection earlier.
Use WP-CLI for long-running imports
WP-CLI runs the importer from a shell instead of keeping a browser request open. You need command-line access (normally SSH), WordPress installed at the destination, and WP-CLI available to that installation. The official command is:
wp import path/to/export.xml
Use the documented attachment option when the source URLs are available and you want the importer to download media:
wp import path/to/export.xml --fetch_attachments
When thumbnail generation is the bottleneck, the importer documents skipping the image_resize step:
wp import path/to/export.xml --skip=image_resize
You can combine attachment fetching with the image-resize skip when appropriate:
wp import path/to/export.xml --fetch_attachments --skip=image_resize
Skipping image resizing can shorten the job, but it also means the destination may not have every generated thumbnail size immediately. Confirm the theme and media workflow before choosing that trade-off. If a command stops, inspect the destination before running it again, just as you would with the browser importer.
Fix missing images and other attachments
Posts can import successfully while images do not. A WXR file normally stores attachment records and source URLs; the importer must then fetch each file from the source site. A successful post import therefore does not prove that media transfer succeeded.
Best Value
Check attachment fetching
- Confirm that attachment fetching is enabled for the method you are using. With WP-CLI, that is the
--fetch_attachmentsoption. - Verify that the source URLs are still reachable from the destination server. A URL that works in your browser may be blocked for server-to-server requests, require authentication, redirect excessively, or return an error.
- Check whether attachment files exceed the destination’s upload or request limits. Large originals can fail even when the WXR XML itself uploads.
- Review server logs and the Media Library for failed or partially created attachments. Compare a known image URL in the imported post with the corresponding media item.
Decide whether to fetch now
If the source site is online and URLs are stable, fetch attachments during the import or in a controlled second pass. If the source is unavailable, import the textual content first and plan a separate media migration; do not keep retrying a job that cannot reach its source files. If thumbnail work causes timeouts, use WP-CLI and consider skipping image_resize, then generate required sizes through a separate, monitored process.
Handle partial imports without creating duplicates
A failed run can leave a mixture of complete and incomplete records. Before retrying, inspect:
- Posts and pages, including drafts and scheduled items
- Authors and user accounts
- Categories, tags, and custom taxonomies
- Comments and comment status
- Attachments, featured images, and other Media Library files
Compare counts and recognizable titles or dates with the source export. Look for duplicate slugs, repeated titles, duplicate users, and posts that exist without their featured images. Preserve the backup and export a report or screenshots of what is present.
A safer retry sequence
- Stop and identify the failure class from the exact message and server logs.
- Correct the limit, input file, attachment condition, or execution method that caused it.
- Choose a clean destination or remove only the partial records you can identify with confidence. A database restore is safer than manual deletion when many object types were created.
- If you must continue on the existing destination, import a narrowly defined WXR segment that does not overlap the completed range.
- After the next run, compare the same object types again before proceeding to another segment.
There is no universal “resume” guarantee for the browser importer. Assume overlapping input can create duplicates unless you have verified exactly what has already been imported.
Browser importer or WP-CLI?
Both methods use the WordPress import process, but they fail in different places. Choose based on the error, your access, and the amount of attachment work.
| Situation | Browser importer | WP-CLI |
|---|---|---|
| Small WXR, ordinary post and page content | Convenient from WordPress admin; no shell access required | Works, but setup is unnecessary for a short job |
| Large XML or PHP memory pressure | May require higher memory or splitting | Still needs adequate PHP memory, but avoids keeping a browser request open |
| Execution or proxy timeout | Vulnerable to PHP, web-server, browser, and gateway limits | Better suited to long-running jobs over SSH |
| Attachment downloads | Enable attachment fetching where offered; monitor failed media | Use --fetch_attachments and review server-side errors |
| Thumbnail generation is slow | Can cause another timeout | Can skip image_resize when the resulting thumbnail trade-off is acceptable |
| Access required | WordPress administrator account and a working upload endpoint | SSH or equivalent shell access, WordPress, and WP-CLI |
| Duplicate risk after failure | Inspect destination before clicking Import again | Inspect destination before rerunning the command |
WP-CLI is not a cure for malformed XML or unreachable attachment URLs. It is primarily a way to avoid browser and proxy limits and to control attachment and image-processing work more precisely.
Recommended Free Tools
Recommended recovery workflow
- Back up first. Include the destination database and any media created by earlier attempts.
- Classify the message. Separate upload-size, memory, timeout, parser, attachment, and partial-import symptoms.
- Validate the WXR. Regenerate it if it is truncated, malformed, or not a WordPress export.
- Match the remedy. Raise the relevant PHP or server limit only when permitted; otherwise ask the host or split the export.
- Reduce job size. Use smaller valid WXR segments when memory or runtime remains high.
- Move long jobs to WP-CLI. Run
wp import <file>; add--fetch_attachmentsfor media and consider--skip=image_resizeif thumbnail generation is the bottleneck. - Check media separately. Confirm source URLs, attachment limits, and the resulting Media Library.
- Audit after every run. Compare posts, pages, users, taxonomies, comments, and media before importing another overlapping file.
This process prevents the two most expensive mistakes: trying to solve a data problem with a larger PHP limit and rerunning an import without knowing what the first attempt already created.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




