## 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
   ```

5. For the container, choose to use the _same container as the site_.
6. Your scheduled task settings should look like this:

7. Apply your changes to AWS.
8. 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);
   ```
