Created
July 16, 2019 16:20
-
-
Save webtrainingwheels/11d9df0a068f97b0bcc3c18625dae2e7 to your computer and use it in GitHub Desktop.
Clear and preload a specific page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Load WordPress. | |
require( 'wp-load.php' ); | |
// Clear specific page cache | |
if ( function_exists( 'rocket_clean_post' ) ) { | |
rocket_clean_post('30'); | |
} | |
// Preload page | |
wp_remote_get ('https://example.com/page'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment