{"id":28893,"date":"2012-08-17T23:12:43","date_gmt":"2012-08-17T17:42:43","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/?p=28893"},"modified":"2026-10-13T13:41:11","modified_gmt":"2026-10-13T08:11:11","slug":"wordpress-disqus-import-export-comments-errors","status":"publish","type":"post","link":"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/","title":{"rendered":"How to Fix Disqus Import and WordPress Export Comment Errors (2026)"},"content":{"rendered":"<p>Is your Disqus import failing, or does the WordPress export file stop halfway? When we <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-comments\/\">switched WordPress comments to Disqus<\/a> 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&#8217;s how we fixed each one, updated with the current tools and commands for 2026.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-29065\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/WXR-export.png\" alt=\"WordPress export file for Disqus import\" width=\"360\" height=\"365\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/WXR-export.png 360w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/WXR-export-295x300.png 295w\" sizes=\"(max-width: 360px) 100vw, 360px\" \/><\/p>\n<p><strong>Quick answer:<\/strong> For a smooth Disqus import, export your WordPress posts and comments as a WXR file (<strong>Tools &gt; Export &gt; All content<\/strong>, or <code>wp export<\/code> in WP-CLI for big sites), fix any timeouts by raising PHP&#8217;s execution time, remove XML-invalid control characters, then upload the file in Disqus under <strong>Admin &gt; Moderation &gt; Import &gt; WordPress<\/strong>. Disqus emails or shows a report of any comments it couldn&#8217;t import.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6ad5fe8a6284a\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #1a202c;color:#1a202c\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #1a202c;color:#1a202c\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6ad5fe8a6284a\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Step_1_Install_and_connect_the_Disqus_plugin\" >Step 1: Install and connect the Disqus plugin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Step_2_Export_WordPress_comments_and_fix_timeouts\" >Step 2: Export WordPress comments (and fix timeouts)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Step_3_Fix_XML_errors_before_the_Disqus_import\" >Step 3: Fix XML errors before the Disqus import<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Step_4_Run_the_Disqus_import\" >Step 4: Run the Disqus import<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Step_5_Check_the_import_report\" >Step 5: Check the import report<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Should_you_still_use_Disqus_in_2026\" >Should you still use Disqus in 2026?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Frequently_asked_questions\" >Frequently asked questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#How_long_does_a_Disqus_import_take\" >How long does a Disqus import take?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Will_a_Disqus_import_create_duplicate_comments\" >Will a Disqus import create duplicate comments?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Why_is_my_WordPress_export_file_incomplete\" >Why is my WordPress export file incomplete?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2012\/08\/wordpress-disqus-import-export-comments-errors\/#Can_I_import_Disqus_comments_back_into_WordPress\" >Can I import Disqus comments back into WordPress?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Step_1_Install_and_connect_the_Disqus_plugin\"><\/span>Step 1: Install and connect the Disqus plugin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Install the official <a href=\"https:\/\/wordpress.org\/plugins\/disqus-comment-system\/\" target=\"_blank\" rel=\"noopener\">Disqus Comment System<\/a> 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.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_2_Export_WordPress_comments_and_fix_timeouts\"><\/span>Step 2: Export WordPress comments (and fix timeouts)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The plugin&#8217;s own export option can fail on large sites. A WXR export is more reliable:<\/p>\n<ul>\n<li><strong>Dashboard:<\/strong> <strong>Tools &gt; Export &gt; All content &gt; Download Export File<\/strong>. Comments are included with their posts.<\/li>\n<li><strong>WP-CLI (best for big sites):<\/strong> <code>wp export --post_type=post --max_file_size=15<\/code> splits the export into files of about 15 MB, avoiding timeouts.<\/li>\n<\/ul>\n<p>If the downloaded file is cut off (it ends without a closing <code>&lt;\/rss&gt;<\/code> tag), PHP stopped before it finished. Our file stopped at 18 MB because PHP&#8217;s limit was 30 seconds. Raise the limit in your host&#8217;s PHP settings, or temporarily add this to <code>wp-config.php<\/code>:<\/p>\n<pre><code>set_time_limit( 300 );<\/code><\/pre>\n<p>Remove it after exporting. Our final file was over 40 MB.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_3_Fix_XML_errors_before_the_Disqus_import\"><\/span>Step 3: Fix XML errors before the Disqus import<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>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.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-29072\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/XML-error.png\" alt=\"Disqus import XML error\" width=\"500\" height=\"112\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/XML-error.png 500w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/XML-error-300x67.png 300w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Find them with grep (on your server over SSH, or on Mac\/Linux):<\/p>\n<pre><code>grep -n -P \"[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]\" export.xml<\/code><\/pre>\n<p>The 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:<\/p>\n<pre><code>perl -pi -e 's\/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]\/\/g' export.xml<\/code><\/pre>\n<p>In our case, one comment full of shortcode junk caused the problem; deleting it fixed the file.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_4_Run_the_Disqus_import\"><\/span>Step 4: Run the Disqus import<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In your Disqus admin, open <strong>Moderation &gt; Import<\/strong> (or the Import tab under your site&#8217;s admin), choose <strong>WordPress<\/strong>, and upload the WXR file. Large imports can take up to 24 hours. Once comments appear, turn on Disqus in the WordPress plugin settings.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_5_Check_the_import_report\"><\/span>Step 5: Check the import report<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>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.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Should_you_still_use_Disqus_in_2026\"><\/span>Should you still use Disqus in 2026?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>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, <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2014\/08\/load-disqus-comments-on-click-demand\/\">load Disqus comments on click<\/a> or <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2021\/01\/lazy-load-comments-in-wordpress-blogs\/\">lazy load comments<\/a> 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.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_asked_questions\"><\/span>Frequently asked questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"How_long_does_a_Disqus_import_take\"><\/span>How long does a Disqus import take?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Small sites finish in minutes; large imports can take up to a day.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Will_a_Disqus_import_create_duplicate_comments\"><\/span>Will a Disqus import create duplicate comments?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Re-importing the same file can create duplicates. Import once, and only re-import the comments that failed.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Why_is_my_WordPress_export_file_incomplete\"><\/span>Why is my WordPress export file incomplete?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>PHP timed out or ran out of memory. Raise the time limit, export by date range, or use WP-CLI.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_import_Disqus_comments_back_into_WordPress\"><\/span>Can I import Disqus comments back into WordPress?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Yes. Export comments from Disqus as XML, then use the Disqus plugin&#8217;s sync or an importer plugin to bring them into WordPress.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Is your Disqus import failing, or does the WordPress export file stop halfway? When we switched WordPress comments to Disqus&#8230;<\/p>\n","protected":false},"author":4,"featured_media":29065,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"default","_kad_post_title":"default","_kad_post_layout":"default","_kad_post_sidebar_id":"","_kad_post_content_style":"default","_kad_post_vertical_padding":"default","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[6],"tags":[49,17],"class_list":["post-28893","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogging","tag-tutorials","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/28893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=28893"}],"version-history":[{"count":3,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/28893\/revisions"}],"predecessor-version":[{"id":65454,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/28893\/revisions\/65454"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media\/29065"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=28893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/categories?post=28893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/tags?post=28893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}