[wp-hackers] Bootstrapping WordPress

Dagan Henderson Dagan.Henderson at epyllion.com
Tue Oct 4 15:19:40 UTC 2011


I'm working on a process that requires a cron job and would prefer to execute the PHP script directly instead of using cURL to execute the code via the Web server. In the past, I've bootstrapped WordPress, through trial and error and Googling like this:
require('<path-to>/wp-config.php');
$wp->init();
$wp->parse_request();
$wp->query_posts();
$wp->register_globals();
Is there a preferred method for bootstrapping, or is this as good as any?
Cheers!
~Dagan


More information about the wp-hackers mailing list