Title: Firewall optimization without auto_prepend_file
Last modified: December 4, 2023

---

# Firewall optimization without auto_prepend_file

 *  Resolved [webtent](https://wordpress.org/support/users/webtent/)
 * (@webtent)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/firewall-optimization-without-auto_prepend_file/)
 * We have a site on a server that uses auto_prepend_file already that cannot be
   changed. Is there another way to apply the Wordfence firewall optimization? We
   get an error when choosing to auto apply, then we try the manual option only 
   to have the setting overridden by the server. We’ve confirmed with server admin
   it cannot be used.

Viewing 1 replies (of 1 total)

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/firewall-optimization-without-auto_prepend_file/#post-17256577)
 * Hi [@webtent](https://wordpress.org/support/users/webtent/), thanks for getting
   in touch.
 * Wordfence is required to run before any other WordPress code runs in order to
   be considered “optimized”, although there are some alternative hosting provider
   setups that you _might_ be able to get some inspiration from in this custom case:
   [https://www.wordfence.com/help/firewall/optimizing-the-firewall/#alternative-hosting-provider-setups](https://www.wordfence.com/help/firewall/optimizing-the-firewall/#alternative-hosting-provider-setups)
 * You can still run Wordfence in “basic” protection, and although this isn’t our
   recommended state, with _some_ hosts/configurations can be unavoidable. Using
   the `INCLUDE` option during optimization would replace your existing `auto_prepend_file`
   with **wordfence-waf.php** but also include the previous value set in `auto_prepend_file`
   inside wordfence-waf.php itself. You may be able to request that your server 
   admin allows this to happen as the file previously occupying that setting will
   still be run – but after Wordfence has loaded.
 * Many thanks,
   Peter.

Viewing 1 replies (of 1 total)

The topic ‘Firewall optimization without auto_prepend_file’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/firewall-optimization-without-auto_prepend_file/#post-17256577)
 * Status: resolved