What Should I do if my MailPoet Key is Deactivated on its Own?

Occasionally, you can run into an issue when your MailPoet key gets deactivated and returned as invalid every now and again. Sending is getting paused when it happens.

MailPoet runs a cron task to check whether the URL of your site is still associated with your API key. In certain circumstances, the URL returned by the cron task is different from your site's URL.

Why it happens

  • We've seen this issue on certain hosts, where a site has a domain name of example.com, but the hosting company triggers Cron to run on a different URL. This causes the site to interact with the Cron via example.com, but scheduled tasks were running on example.com.myhostingcompany.com or www.example.com (or something else). If your website is hosted with Dreamhost, for example, it's known that they can dynamically change your site URL in wp-config.php, and it should affect the key check task.
  • Sometimes we also see it in the form of site misconfiguration, where e.g. the database has one site URL, while in wp-config.php there's another URL set via SITE_URL or WP_HOME constant, two versions of your domain URL in the Settings, or any redirects in place
  • It may also happen on multilingual sites with dynamic URL constants.

Logging

You can find which URL was returned by the key check task in MailPoet > Settings > Advanced tab > Logging > See logs. Look for the `mss.ERROR: key-validation.failed` logs. To expand the truncated log, use `cmd + click` on the log's message.

If you didn't have logging enabled before, please enable it and wait for the issue to reoccur. After your key deactivates again, check the logs.

Knowing what URL is returned by the key check helps determine what adjustments should be done in your site config or by your hosting.

Workaround

If you don't know why a different URL is returned, please set up Linux Cron as it will bypass your site's Cron: Setting the Server Side Cron (Linux Cron)

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.