Tips & Tricks

Setup wp-cron as a scheduled task

By default WP runs it's scheduled tasks on every page load, but this isn't great for performance. We recommend you setup wp-cron as a scheduled task and disable this in wp-config.php.

  1. Create a scheduled task.
  2. Go to the site in idealstack, add a scheduled task.
  3. Set the Schedule to rate(1 minute).
  4. Set the command to :
   cd ~/public_html && php -q wp-cron.php
  1. For the container, choose to use the same container as the site.

  2. Your scheduled task settings should look like this:

  3. Apply your changes to AWS.

  4. Go to the bottom of the database settings in wp-config.php. Add the code below highlighted in red:

   /** The Database Collate type. Don't change this if in doubt. */
   define('DB_COLLATE', '');
   
   define('DISABLE_WP_CRON', true);