Disable the WordPress cron script
NOTE: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.
The wp-cron.php script will run once a user visits your site. If you get a lot of traffic, this could be a problem. This cron task is really necessary when you make updates in the blog. You can move this cron script to a system cron task to help lower resource usage on the server.
Approach A: Bitnami installations using system packages
Disable the wp-cron.php script in the installdir/wordpress/wp-config.php file. The location is important - add the line below just before the database settings:
define('DISABLE_WP_CRON', true);
Then, add the cron task to the system. For example, this cron task will run the wp-cron.php process every hour. You can add it using the following command:
$ sudo crontab -e
0 * * * * su daemon -s /bin/sh -c "cd installdir/wordpress; installdir/php/bin/php -q wp-cron.php"
Approach B: Self-contained Bitnami installations
Disable the wp-cron.php script in the installdir/apps/wordpress/htdocs/wp-config.php file. The location is important - add the line below just before the database settings:
define('DISABLE_WP_CRON', true);
Then, add the cron task to the system. For example, this cron task will run the wp-cron.php process every hour. You can add it using the following command:
$ sudo crontab -e
0 * * * * su daemon -s /bin/sh -c "cd installdir/apps/wordpress/htdocs/; installdir/php/bin/php -q wp-cron.php"