Title: Firewall cannot run
Last modified: April 3, 2021

---

# Firewall cannot run

 *  Resolved [Johnot](https://wordpress.org/support/users/biblo47/)
 * (@biblo47)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/firewall-cannot-run/)
 * On domain [https://trashvideoarchives.com/](https://trashvideoarchives.com/)
   
   The Wordfence Web Application Firewall cannot run. The configuration files are
   corrupt or inaccessible by the web server, which is preventing the WAF from functioning.
   Please verify the web server has permission to access the configuration files.
   You may also try to rebuild the configuration file by clicking here. When I follow
   that link it says: We were unable to write to ~/wp-content/wflogs/ which the 
   WAF uses for storage. Please update permissions on the parent directory so the
   web server can write to it. I can’t find the ‘Optimize the Wordfence Firewall’
   button
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffirewall-cannot-run%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/firewall-cannot-run/#post-14277109)
 * Hi [@biblo47](https://wordpress.org/support/users/biblo47/), sorry to see you’re
   having trouble with optimizing and running the firewall.
 * Usually the ‘Optimize the Wordfence Firewall’ button is present in the setup 
   wizard reached through the ‘Click here to Conifigure’ option that appears when
   the firewall is not yet optimized after setting up Wordfence. If you can’t see
   these options, chances are that you have already been through these setup steps
   so the problem may be with permissions, the wflogs folder, or rules.php file 
   itself.
 * Aside from making sure WordPress directories have the recommended 755 permissions
   by using your hosts’ file manager or FTP, make sure you have the latest updates
   to Wordfence and WordPress, then try deleting the **rules.php** file in `wp-content/
   wflogs`. Wordfence will automatically regenerate the file (usually within 30 
   minutes.)
 * If you have persistent problems with this file/folder, you can bypass this entirely
   by setting Wordfence to write to the MySQLi storage engine instead of a file 
   if you prefer: [https://www.wordfence.com/help/firewall/mysqli-storage-engine/](https://www.wordfence.com/help/firewall/mysqli-storage-engine/)
 * There’s also a useful firewall optimization troubleshooting guide which I’m providing
   here for reference: [https://www.wordfence.com/help/firewall/optimizing-the-firewall/troubleshooting/](https://www.wordfence.com/help/firewall/optimizing-the-firewall/troubleshooting/)
 * Let me know how that goes for you.
 * Peter.
 *  Thread Starter [Johnot](https://wordpress.org/support/users/biblo47/)
 * (@biblo47)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/firewall-cannot-run/#post-14277695)
 * deleting the rules.php file in wp-content/wflogs worked. Thanks

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

The topic ‘Firewall cannot run’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Johnot](https://wordpress.org/support/users/biblo47/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/firewall-cannot-run/#post-14277695)
 * Status: resolved