Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Load WordPress.
- require( 'wp-load.php' );
- // Add one page/post per line
- $pages_to_clean_preload = [
- 'https://example.com/page_url',//copy this line as many times as necessary, adding the URLs you want to clear/preload
- ];
- if ( function_exists( 'rocket_clean_post' ) ) {
- foreach( $pages_to_clean_preload as $page_to_clean){
- rocket_clean_post( url_to_postid ( $page_to_clean ) );
- }
- }
- // Preload pages/posts
- foreach( $pages_to_clean_preload as $page_to_preload){
- wp_remote_get( $page_to_preload );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement