Importing content into WordPress can fail for many reasons—file size limits, PHP memory exhaustion, or incompatible formats. This guide walks you through the most frequent WordPress import errors and provides clear, step-by-step fixes to get your posts, pages, and media transferred successfully.
What You’ll Need
- Access to your WordPress admin dashboard (wp-admin).
- FTP or cPanel File Manager access to your hosting account.
- A code editor (like Notepad++ or VS Code) for editing configuration files.
- Your exported XML file (from WordPress, Blogger, or another platform).
- Patience—some imports take several minutes.
Step-by-Step
- Check the file format. WordPress imports expect a WXR (WordPress eXtended RSS) file with a .xml extension. If you’re importing from Blogger or another platform, use the appropriate exporter to generate a WordPress-compatible XML file. Do not try to import a CSV directly—use a plugin like WP All Import for that.
- Increase the maximum upload size. The most common error is “The uploaded file exceeds the upload_max_filesize directive.” Go to Media > Add New and look at the “Maximum upload file size” at the bottom. If it’s too small, you need to increase it. Edit your
php.inifile (or create one in your root folder) and add:upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300 memory_limit = 256M
If you don’t have php.ini access, add this to your
wp-config.phpfile (before the “That’s all, stop editing!” line):@ini_set('upload_max_filesize', '64M'); @ini_set('post_max_size', '64M'); @ini_set('max_execution_time', '300'); - Install the WordPress Importer plugin. Go to Tools > Import and click “Install Now” under WordPress. If you already have it, “Run Importer” will appear. If the plugin fails to install, download it manually from the WordPress plugin repository and upload it via Plugins > Add New > Upload Plugin.
- Split large XML files. If your XML file is over 10 MB, it may time out. Use a tool like “WXR File Splitter” (a free online tool) to divide the file into smaller chunks. Import each chunk separately.
- Use FTP to upload the XML file. If the browser upload keeps failing, upload the XML file to your server manually. Place it in the
/wp-content/uploads/folder (or any accessible folder). Then, when you run the importer, it will ask for a file—but instead of uploading, you can use a plugin like “WordPress Importer” that allows you to specify a file path. Alternatively, use a plugin like “Really Simple SSL” or a custom script to read the file from the server. - Clear server caches. Sometimes, stale cache data causes import errors. Clear any caching plugins (like W3 Total Cache or WP Super Cache) and your browser cache. Also, check if your hosting provider uses a server-side cache (like Varnish) and purge it.
- Disable conflicting plugins. Deactivate all plugins except the importer, then try the import again. If it works, reactivate plugins one by one to find the culprit. Common offenders are security plugins that block file uploads or caching plugins that interfere with the import process.
- Switch to a default theme. Your active theme might have custom code that conflicts with the importer. Temporarily switch to a default WordPress theme (like Twenty Twenty-Four) and try the import again.
- Check for special characters in the XML. If you get a “Invalid XML” error, the file may contain unescaped characters. Open the XML in a text editor and look for stray ampersands (&) or unclosed tags. You can use an XML validator (like the one at validator.w3.org) to find errors.
- Import media separately. If the import succeeds but images fail, you can import the content without media first (uncheck “Download and import file attachments” during import). Then, use a plugin like “Import External Images” to fetch images from URLs.
Common Mistakes
- Ignoring the upload size limit. Many users waste time trying to upload a 100 MB file when the limit is 2 MB. Always check the limit first.
- Not using the correct importer. Importing a Blogger XML into the “WordPress” importer will fail. Use the specific importer for your source platform.
- Editing the XML incorrectly. If you manually edit the file, you might break the structure. Always make a backup before editing.
- Forgetting to increase PHP memory. Even if the file uploads, the import process can run out of memory. Always increase memory_limit to at least 256M.
- Importing into a fresh site without setting up permalinks. This can cause redirect issues. Set your permalink structure before importing.
Tips
- Always perform a full backup of your site before importing.
- Use a local development environment (like Local by Flywheel) to test the import before doing it on your live site.
- If you have a lot of media, consider importing content first, then use a plugin to bulk-download images from a URL list.
- If the import times out, try increasing the
max_execution_timein php.ini to 600 or more. - Use a plugin like “WP Reset” to clear all content if you need to start fresh after a failed import.
Troubleshooting
If the import still fails after following the steps above, try these advanced fixes:
- Check the error log. Look in your hosting control panel for the PHP error log. It will show the exact reason for the failure (e.g., “Allowed memory size exhausted”).
- Use a different browser. Some browsers have issues with large uploads. Try Chrome or Firefox with all extensions disabled.
- Try a different import method. If the built-in importer fails, use a plugin like “WP All Import” which handles large files better and gives more control.
- Import in stages. Use the WXR File Splitter to split the file into tiny pieces (e.g., 1 MB each) and import them one by one.
- Contact your host. Some shared hosts have strict execution time limits that you cannot override. Ask them to temporarily increase the limits for you.
Frequently Asked Questions
Why does my import keep timing out?
This happens when the PHP script execution time is too low. Increase max_execution_time in php.ini or wp-config.php to 300 or more. Also, split the XML file into smaller chunks.
Can I import a CSV file into WordPress?
No, the built-in importer only accepts XML files. For CSV, use a plugin like WP All Import or WP Ultimate CSV Importer.
What does “Sorry, there has been an error” mean?
This generic error often indicates a memory limit or file permission issue. Check your PHP error log and increase memory_limit. Also, ensure the uploads folder is writable.
How do I import images without downloading them?
During the import, uncheck “Download and import file attachments.” Then use a plugin like “Import External Images” to fetch images from the original URLs.
Why are my imported posts missing featured images?
This usually happens when the image URLs in the XML are broken or the images are not hosted on the same domain. You can manually set featured images or use a plugin to assign the first image in the post as the featured image.
Can I import content from a WordPress.com site?
Yes, export your content from WordPress.com (Tools > Export) and import the XML file into your self-hosted site using the WordPress importer.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Valheim Server Not Showing in Community List Fixes
- DisplayPort vs HDMI: Which Cable Should You Use?
- Soundbar vs 2.1 Speaker System: Which Is Better?
- Slack Channels for Construction Projects: Setup Guide
- Surface Won’t Turn On: Quick Fixes1.8 h
- Survive Lava for Brainrot Tier List170 points