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 recomend you setup wp-cron as a scheduled task and disable this in wp-config.php

  1. Create a scheduled task. 
    1. Go to the site in idealstack, add a scheduled task
    2. Set the Schedule to rate(1 minute)
    3. Set the command to :
          cd ~/public_html && php -q wp-cron.php
    4. For the container, choose to use the same container as the site
    5. Your scheduled task settings should look like this
  2. Apply your changes to AWS
  3. 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);