Title: Manual trigger from PHP
Last modified: August 5, 2024

---

# Manual trigger from PHP

 *  Resolved [cvladan](https://wordpress.org/support/users/cvladan/)
 * (@cvladan)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/manual-trigger-from-php/)
 * How can I force the start of the cache warming process from PHP code? Specifically,
   after staging push to production, I do clear the cache in production environment
   using PHP code, and now I also want to trigger cache warming using PHP. Just 
   like pressing “Start a new Warm-Up” button, but from code.

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

 *  Plugin Author [TMM Technology](https://wordpress.org/support/users/tmmtechnology/)
 * (@tmmtechnology)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/manual-trigger-from-php/#post-18043827)
 * [@cvladan](https://wordpress.org/support/users/cvladan/) Hi!
   I added this logic.
   Could you try:
    - Start: `\Cache_Warmer\AJAX::start_warm_up( false );`
    - Stop: `\Cache_Warmer\AJAX::stop_warm_up( false );`
 * Prob on ‘init’ event.
 *  Thread Starter [cvladan](https://wordpress.org/support/users/cvladan/)
 * (@cvladan)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/manual-trigger-from-php/#post-18052342)
 * Tried and it’s working! Thanks 🙏

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

The topic ‘Manual trigger from PHP’ is closed to new replies.

 * ![](https://ps.w.org/cache-warmer/assets/icon.svg?rev=2869611)
 * [Cache Warmer](https://wordpress.org/plugins/cache-warmer/)
 * [Support Threads](https://wordpress.org/support/plugin/cache-warmer/)
 * [Active Topics](https://wordpress.org/support/plugin/cache-warmer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cache-warmer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cache-warmer/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [cvladan](https://wordpress.org/support/users/cvladan/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/manual-trigger-from-php/#post-18052342)
 * Status: resolved