Title: Trigger Preload Programmatically
Last modified: February 3, 2021

---

# Trigger Preload Programmatically

 *  Resolved [royalswes10](https://wordpress.org/support/users/royalswes10/)
 * (@royalswes10)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/trigger-preload-programmatically/)
 * I see that I can trigger a purge of all pages with the method `WP_Optimize()-
   >get_page_cache()->purge();` and that’s very useful.
 * I’m wondering if there is a way to also trigger a preload programmatically as
   well?
 * I would like to trigger a preload right after I trigger a purge so that my pages
   will always be preloaded.
    -  This topic was modified 5 years, 6 months ago by [royalswes10](https://wordpress.org/support/users/royalswes10/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/trigger-preload-programmatically/#post-14025462)
 * [@royalswes10](https://wordpress.org/support/users/royalswes10/) Sorry for the
   delay!
 * At the moment you can only manually set the Preload function from WP-optimize
   > Cache > Preload you cannot set it automatically to Preload the posts/pages.
 * Thanks,
    Harshad
 *  Thread Starter [royalswes10](https://wordpress.org/support/users/royalswes10/)
 * (@royalswes10)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/trigger-preload-programmatically/#post-14026339)
 * Ok, thanks. For what it’s worth, that’d be a feature I would use.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Trigger Preload Programmatically’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [royalswes10](https://wordpress.org/support/users/royalswes10/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/trigger-preload-programmatically/#post-14026339)
 * Status: resolved