Title: Firewall optimization stuck
Last modified: August 29, 2020

---

# Firewall optimization stuck

 *  Resolved [Nick Nack](https://wordpress.org/support/users/aderobinson/)
 * (@aderobinson)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-stuck/)
 * I just transferred my site from one host to another and added wordfence. I try
   to Optimize Wordfence Firewall as I usually do, but it says:
 * “To make your site as secure as possible, the Wordfence Web Application Firewall
   is designed to run via a PHP setting called auto_prepend_file, which ensures 
   it runs before any potentially vulnerable code runs. This PHP setting is currently
   in use, and is including this file:”
 * It said I can include or override. I tried both. And no matter how many times
   I press continue, I still see that it is not optimized. A dialogue box will come
   up saying that it has been. But at the top the dialogue box “To make your site
   as secure as possible, take a moment to optimize the Wordfence Web Application
   Firewall:” continues to remain.
 * Also, I notice that when I go to Firewall menu, the button to optimize firewall
   is still available.

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

 *  Plugin Support [WFAdam](https://wordpress.org/support/users/wfadam/)
 * (@wfadam)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-stuck/#post-13338921)
 * Hello [@aderobinson](https://wordpress.org/support/users/aderobinson/) and thanks
   for reaching out to us!
 * If you are moving your site to a new server we recommend that you first remove
   extended protection. When your site has been migrated, you will then optimize
   the Firewall again. If you didn’t do this, we might need to change some files
   to correct the issue.
 * Check your .htaccess file and/or a .user.ini file which loads the file via a 
   PHP value called auto_prepend_file. Please check those two files, they will be
   located in the root of your WordPress installation file. You may have to correct
   the path involved if the path would have changed.
 * If this doesn’t work, A complete re-install of Wordfence might be a good step.
   It’s always best to make a backup of the site and database before installing/
   removing plugins, just to be safe.
 * Additionally, you can backup your Wordfence settings via the Export option (Wordfence
   > Tools > Import/Export Options and click Export. You can also take note of the
   current Whitelisted URLs you have in Wordfence > Firewall > All Firewall Options
   > Whitelisted URLs as these are not included in the Import/Export, and will be
   lost during the re-install. Here is what is exported: [https://www.wordfence.com/help/tools/import-export/](https://www.wordfence.com/help/tools/import-export/)
   During the export, you will be given a long string of text. Keep this safe, you’ll
   need it in a few minutes.
 * After that, enable the option to Delete Wordfence tables and data on deactivation
   in Wordfence > All Options > General Wordfence Options. You will want to remember
   to disable this after you reinstall Wordfence again.
 * After you enable that option, you can deactivate Wordfence from the Plugins area
   of your site, then delete it. Next, from the plugins area, search for and re-
   install Wordfence like normal.
 * It will be like setting Wordfence up for the first time. You will need to enter
   an email address, and then go into Wordfence > Tools > Import/Export Options 
   and paste that string of text into the Import Wordfence Options field and click
   the button there.
 * The firewall will be in Learning Mode by default for 7 days. I would recommend
   switching this to “Enabled and Protected” as soon as possible.
 * Let me know what you find and if this is helpful!
 * Thanks!
 *  Thread Starter [Nick Nack](https://wordpress.org/support/users/aderobinson/)
 * (@aderobinson)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-stuck/#post-13339078)
 * Hi thanks for your reply.
 * I realized that I was not logged into the right host WP admin area. I was still
   in the WP admin area for the old host, and that host doesn’t have compatibility
   with Wordfence.
 * Thanks anyway!
 *  Plugin Support [WFAdam](https://wordpress.org/support/users/wfadam/)
 * (@wfadam)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-stuck/#post-13339136)
 * Thanks [@aderobinson](https://wordpress.org/support/users/aderobinson/) !
 * Glad you could figure it!
 * Thanks for your support!

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

The topic ‘Firewall optimization stuck’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [WFAdam](https://wordpress.org/support/users/wfadam/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/firewall-optimization-stuck/#post-13339136)
 * Status: resolved