Syncing with WordPress

Syncing may be enabled between WordPress and Disqus using the WordPress plugin. This will copy comments posted in Disqus to the WordPress native comment system, so that they appear in both locations. Comments are synced to your WordPress database using a webhook method starting in version 3.0 instead of wp-cron which is both more reliable and secure for your website.

As Disqus replaces the native WP comments system, this will not change what appears on your page when Disqus loads. However, the comments synced from Disqus back to the native WP comment system will appear if Disqus is no longer installed, and will be included in the source code of the page they were posted to.

Setting up Comment Syncing in the WordPress plugin

Syncing is not enabled by default in the WordPress plugin. To enable syncing, you will need to set it up either via Automatic Installation in the plugin or manually by setting up an API application and entering the credentials in your Site Configuration (see instructions below). Once you've entered your API credentials, enable Comment Syncing in the Syncing tab of the plugin.

How to manually set up Comment Syncing

When creating an API application to sync comments, make sure your API credentials are entered in the Site Configuration tab. Go to the Syncing tab to enable comment syncing.

  1. Create an application (or use an existing application you own) and make note of the following which you will need to copy and paste:
    • public key
    • secret key
    • access token
  2. Change your application "Default Access:" drop-down setting to "Read, write, and manage forums" so that your application can create syncing webhooks for your forum
  3. Paste the keys and token from the step above into the correct fields in your WordPress plugin settings

How to pause Comment Syncing

To pause Comment Syncing, simply click Pause Auto Syncing in the Syncing tab of the WordPress plugin.

Which comments will be synced?

When a comment is posted or edited, this triggers the comment to be synced with WordPress. It supports all comment states including approved, pending, spam, and deleted comments.

Note: It's not currently possible to retroactively sync previous Disqus comments.

Troubleshooting

  • Solution 1

    Make sure you're using the latest version of the Disqus for WordPress plugin.

  • Solution 2

    You may need to add this code to the wp-config.php in Wordpress that causes it to jump start its Cron service again using the following: // Alternate cron method define( 'ALTERNATE_WP_CRON', true );

  • Solution 3

    If the "dsq_sync_forum" cron still isn't running as a once off, we'd recommend installing WP-Crontrol (visit plugin site) which allows you to not only see your current cron's but modify them. You can then force "dsq_sync_forum" to occur every 10 minutes.

  • Solution 4

    Disqus settings may have gotten corrupted and need to be reset. To do this:

    1. Under Advanced Options in the Disqus plugin, click Uninstall to reset Disqus' settings -- your comments won't be affected or removed.
    2. Follow the instructions to fully reset Disqus's current settings.
    3. Re-configure the Disqus plugin.
  • Solution 5

    This may be a conflict with your current theme or a plugin. To determine this:

    1. Temporarily revert to the default WordPress theme.
    2. Under Advanced Options in the Disqus plugin, click Sync Comments. If the issue persists, proceed to step 3.
    3. Temporarily disable all plugins (except Disqus).
    4. Click Sync Comments.
  • Solution 6

    A setting on your installation may be causing automatic sync to not complete properly. To bypass this:

    1. Temporarily revert to the default WordPress theme.
    2. Temporarily disable all plugins (except Disqus).
    3. Sync manually by running /scripts/import-comments.php found in the Disqus plugin folder.
  • Solution 7

    The Disqus data in your WordPress database may have become corrupted. To fix this:

    1. Under Advanced Options in the Disqus plugin, enable the "Remove all imported Disqus comments before syncing" checkbox.
    2. Click Sync Comments.
  • Syncing still not working properly?

    Contact us with the following info:

    • Description of what specifically isn't working properly
    • Debug info found under Advanced Options in the Disqus plugin
    • What you found in solutions 1-5 above
    • Text dump of the results outputted from solution 4
    • Dumps of your wp_posts ,wp_postmeta, wp_comments, and wp_commentmeta SQL tables
    • (If duplication is occurring) Text of a duplicated comment

Exporting Issues

Alternatively, if you're having issues with copying comments from WordPress to Disqus, see Exporting comments from WordPress to Disqus.

Other Issues

Comments synced to WordPress have the wrong status

To make sure that comments have the most-up-to-date status, we'd recommend using the manual sync option within the settings of the Disqus WP plugin. You'll want to overwrite the previously synced comments in order to make sure the correct comments are synced.

To prevent comments from being synced automatically in the future, you can disable this feature within the Syncing settings of the WordPress plugin.

Did you find this article helpful?