Skip to content

Instantly share code, notes, and snippets.

@froger-me
Last active August 24, 2018 02:59
Show Gist options
  • Save froger-me/61b56ca5a33668582c6f11a8336f8fc2 to your computer and use it in GitHub Desktop.
Save froger-me/61b56ca5a33668582c6f11a8336f8fc2 to your computer and use it in GitHub Desktop.
WordPress force request update - emulate wp-cron
<?php
require dirname( __FILE__ ) . '/wp-load.php';
add_filter( 'wp_doing_cron', '__return_true' );
wp_maybe_auto_update();
remove_filter( 'wp_doing_cron', '__return_true' );
die();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment