is a premium extension.
If CRON is foreign to you, first make sure this line DOES NOT exist in your wp-config file:
If it does, remove it immediately and spend some time re-testing the plugin on your system. There are several other factors that could prevent emails from being sent, such as email settings, filtering methods, etc. We recommend reading more about this in Emails and WooCommerce. There are also a few peculiar issues inherent in WordPress that could prevent an email from being sent:
Are you trying to send emails 1 minute after an action? With some sites/hosts, this causes issues. The first recommendation is to extend your intervals to a longer window – say 10-15 minutes. The extra time could, and usually does, have fantastic results. The reality is, what is an extra nine minutes? It really isn’t that long. If this doesn’t work, read on.
There is also a known issue on WordPress sites that get little, or no, traffic on any given day. Follow-up Emails rely on a function called WP-Cron, and this function only runs when there is a page requested. So, if there are no visits to your website, then the scheduled jobs are not run.
In a perfect world, scheduling perfectly timed events to run at specified intervals is what should occur, but WP-Cron is not the same as the Unix cron scheduler. The key distinction lies in how it is run; unlike a background process, WP-Cron kicks in every time a visitor opens your WordPress-powered site. As such, it will remain imprecise in terms of timing the sending of your email follow-ups. In the world of Follow-up Emails this can cause a “problem” for you. If you have a schedule of emails to be sent, and no visits are made to your website, the queue will not be processed, and no emails will be sent. But, there are two solutions:
This is the best set of instructions for fixing this, and for making it more “perfectly timed.”
In our example, we will use cPanel in this example since there is a very good chance your web host uses it. Setting up a cron job with other hosting control panels such as Plesk should be similar (in some cases the feature may be called “Scheduled Tasks” or similar).
- Log into cPanel
- Under Advanced, click on Cron jobs
- Under Add New Cron Job, choose “Once an hour” for Common Settings
- Enter this for Command (changing the URL to match your site):
wget -q -O - http://yourdomain.com/wp-cron.php?doing_wp_cron
- Click Add New Cron Job
If you also do not wish to receive notifications every time your CRON runs, add
after the Command above.
What this does is trigger WordPress’s wp-cron.php script every hour (you can make it more frequent). Any tasks that WordPress has scheduled to run will run (publish a scheduled post, see if my plugin’s recurring events need to be moved forward, etc.). You are no longer relying on WordPress’s “virtual cron” to be triggered upon a site visit, so in this case you must now add to your wp-config file:
Try this plugin: WP-Cron Control
Please note that ALTERNATE_WP_CRON is not recommended as with some hosts it causes slowness, and random redirects through the CRON URL string –
/?doing_wp_cron. Use this option that follows only as a last resort if you are unable to find another suitable hosting provider that will allow CRON to run normally.
Some hosts do not allow CRON or what they call HTTP Loopbacks. This causes additional heartache and confusion as it makes sending emails a little harder, but with a little legwork it can be solved using alternative CRON.
Heart Internet (others can use this example as well)
This may look very familiar, but with Heart Internet, you have to input your command a little differently, and not intuitively.
- Log into your Panel
- Find Tasks, CRON, or Scheduled Tasks
- In the “Run this command:” box put
- Then select the schedule you want this to run from you
- Click save
Next, you’ll need to edit your wp-config.php file. Place the following before the “Authentication Unique Keys and Salts” section.
define( 'ALTERNATE_WP_CRON', true );
This combination should get you running.
Anytime a Follow-up email is created in the system, an email for it can only be sent for sign-ups, orders, etc., that are made after the email has been created by default – not before – unless you run the “Import Existing Orders” function when creating the email. This function is in the “Email Details” > “Settings” on the Edit Email screen.
Are you using WP Engine? We love those guys, and they host awesome WordPress sites, but simply put WP Engine does not provide email as part of their hosting package. They just host WordPress sites – awesomely. Funny, confusing, and strange all at the same time. With that said, you will need a provider installed to handle sending the emails. Being that provider is on our roadmap, but we do not have that functionality built-in as of yet. For now, connect with WP Engine on a provider of choice.
In addition, please ensure that if you are using HTTP Auth, that you turn it off to test sending emails.