How to Fix Disqus Import and WordPress Export Comment Errors (2026)
Is your Disqus import failing, or does the WordPress export file stop halfway? When we switched WordPress comments to Disqus in 2012, we had to move nearly 30,000 comments and hit almost every error possible: a plugin export that failed, a WXR file that timed out at 18 MB, and XML errors that stopped Disqus processing the file. Here’s how we fixed each one, updated with the current tools and commands for 2026.

Quick answer: For a smooth Disqus import, export your WordPress posts and comments as a WXR file (Tools > Export > All content, or wp export in WP-CLI for big sites), fix any timeouts by raising PHP’s execution time, remove XML-invalid control characters, then upload the file in Disqus under Admin > Moderation > Import > WordPress. Disqus emails or shows a report of any comments it couldn’t import.
Table of Contents
Step 1: Install and connect the Disqus plugin
Install the official Disqus Comment System plugin, connect it to your Disqus site (shortname) and keep comments syncing to WordPress enabled, so new Disqus comments are also stored in your database as a backup.
Step 2: Export WordPress comments (and fix timeouts)
The plugin’s own export option can fail on large sites. A WXR export is more reliable:
- Dashboard: Tools > Export > All content > Download Export File. Comments are included with their posts.
- WP-CLI (best for big sites):
wp export --post_type=post --max_file_size=15splits the export into files of about 15 MB, avoiding timeouts.
If the downloaded file is cut off (it ends without a closing </rss> tag), PHP stopped before it finished. Our file stopped at 18 MB because PHP’s limit was 30 seconds. Raise the limit in your host’s PHP settings, or temporarily add this to wp-config.php:
set_time_limit( 300 );Remove it after exporting. Our final file was over 40 MB.
Step 3: Fix XML errors before the Disqus import
Our file uploaded fine but failed processing with XML syntax errors. Disqus support explained that some comments contained characters that are valid UTF-8 but not allowed in XML, mostly invisible control characters pasted in from other programs.

Find them with grep (on your server over SSH, or on Mac/Linux):
grep -n -P "[\x00-\x08\x0B\x0C\x0E-\x1F]" export.xmlThe command prints the line number of every offending character. Either edit those comments in WordPress and re-export, or strip the characters from the file in one go:
perl -pi -e 's/[\x00-\x08\x0B\x0C\x0E-\x1F]//g' export.xmlIn our case, one comment full of shortcode junk caused the problem; deleting it fixed the file.
Step 4: Run the Disqus import
In your Disqus admin, open Moderation > Import (or the Import tab under your site’s admin), choose WordPress, and upload the WXR file. Large imports can take up to 24 hours. Once comments appear, turn on Disqus in the WordPress plugin settings.
Step 5: Check the import report
Disqus lists comments that failed to import. Ours were all spam or contained broken code, so we deleted them in WordPress. If real comments fail, edit them to remove odd characters and import a small file with just those posts.
Should you still use Disqus in 2026?
Disqus is easy to install and handles moderation and spam, but the free plan shows ads and loads extra scripts that can slow pages. If you keep it, load Disqus comments on click or lazy load comments to protect page speed. Disqus also lets you export your comments as XML any time, so you can move back to native WordPress comments later.
Frequently asked questions
How long does a Disqus import take?
Small sites finish in minutes; large imports can take up to a day.
Will a Disqus import create duplicate comments?
Re-importing the same file can create duplicates. Import once, and only re-import the comments that failed.
Why is my WordPress export file incomplete?
PHP timed out or ran out of memory. Raise the time limit, export by date range, or use WP-CLI.
Can I import Disqus comments back into WordPress?
Yes. Export comments from Disqus as XML, then use the Disqus plugin’s sync or an importer plugin to bring them into WordPress.
Get our free weekly email: new tech guides and tools, no spam.
New and updated tech guides, a free tool worth bookmarking and one useful pick, once a week. No spam, unsubscribe anytime.
One email a week. Unsubscribe anytime. See our privacy policy.







Hey ! I just installed Disqus on my WordPress site; but i’m fairly disappointed to see that Disqus doesn’t recognize my old comments : all my older comments are marked as posted by a guest. Did I miss a step ? Is there a way to have my old comments linked to my Disqus profile ? (my Disqus user mail is the exact same as my wordpress admin-user email, I would have thought it would have been automaticly recognized).
I will try to do this. Hopefully it will work for me.
I also got error using wordpress export tool. Please tell me is this tool is fix in latest wordpress version.
Web forms are quite easy to explain through tutorial. But, Whenever you going through the whole details then its quite tough challenge for you as well.