Title: Dynamically set hook URL
Last modified: April 29, 2021

---

# Dynamically set hook URL

 *  Resolved [Eddy](https://wordpress.org/support/users/jameseddyedwards/)
 * (@jameseddyedwards)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/dynamically-set-hook-url/)
 * Hey Nahid, firstly great plugin. Really useful.
 * Is there a way to dynamically set the hook url for automated deployments? E.g.
   when I publish a Staging site to a Production site that the Production hook doesn’t
   get overwritten with the Staging hook as the DB gets copied across?

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

 *  Plugin Author [Nahid Ferdous Mohit](https://wordpress.org/support/users/nfmohit/)
 * (@nfmohit)
 * [5 years ago](https://wordpress.org/support/topic/dynamically-set-hook-url/#post-14431940)
 * Hey [@jameseddyedwards](https://wordpress.org/support/users/jameseddyedwards/)!
   
   I hope you are having a great day!
 * Thank you for your query.
 * Unfortunately, something like that isn’t possible at the moment, out of the box.
 * However, your requirement sounds exciting and I’d like to explore the possibility
   of including it into the plugin. If possible, could you share a wider use case
   of this feature so that I can get a clearer idea of how it will function?
 * Thank you!
 * Kind regards,
    Nahid
 *  Thread Starter [Eddy](https://wordpress.org/support/users/jameseddyedwards/)
 * (@jameseddyedwards)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/dynamically-set-hook-url/#post-14614827)
 * Hey Nahid,
 * Apologies for the delayed response.
 * Sure, so our use case is that we use WPEngine to deploy our site. So we have 
   both a Staging and a production WordPress instance. When we deploy Staging to
   live the DB is copied too so if the Staging instance has a Netlify hook for a
   Staging deployment then live would inherit that Staging hook rather than persisting
   a production hook.
 * I think other plugins get around this by allowing you to set a config option 
   in the wp-config.php file. If set, your Netlify plugin would use that value as
   the hook. Otherwise it would use the value defined in the UI.
 * I hope that helps. Happy to provide any more info if needed.
 * All the best,
    Eddy

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

The topic ‘Dynamically set hook URL’ is closed to new replies.

 * ![](https://ps.w.org/deploy-netlifypress/assets/icon-256x256.png?rev=2146696)
 * [Deploy with NetlifyPress](https://wordpress.org/plugins/deploy-netlifypress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/deploy-netlifypress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/deploy-netlifypress/)
 * [Active Topics](https://wordpress.org/support/plugin/deploy-netlifypress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/deploy-netlifypress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/deploy-netlifypress/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Eddy](https://wordpress.org/support/users/jameseddyedwards/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/dynamically-set-hook-url/#post-14614827)
 * Status: resolved