Title: Cannot do security optimization
Last modified: August 16, 2020

---

# Cannot do security optimization

 *  Resolved [Tom](https://wordpress.org/support/users/chapteradmin/)
 * (@chapteradmin)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/cannot-do-security-optimization/)
 * When trying to optimize security I get the following message – “We were unable
   to make changes to the .htaccess file. Its possible WordPress cannot write to
   the .htaccess file because of file permissions, which may have been set by another
   security plugin, or you may have set them manually. Please verify the permissions
   allow the webserver to write to the file, and retry the installation.”
 * Where should I look for access to the file?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcannot-do-security-optimization%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [WFAdam](https://wordpress.org/support/users/wfadam/)
 * (@wfadam)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/cannot-do-security-optimization/#post-13271286)
 * Hello [@chapteradmin](https://wordpress.org/support/users/chapteradmin/) and 
   thanks for reaching out to us!
 * This error will usually occur if a different security plugin is active on the
   site. If this is the case for you, simply disable the other plugin until you 
   have optimized the firewall for Wordfence, then you can re-enable it.
 * If this is not your scenario, Can you see the Wordfence code surrounded with 
   comments “Wordfence WAF” and “END Wordfence WAF” in the .user.ini file located
   in the site’s main directory?
 * In case you do, could you check that the path to the wordfence-waf.php file (
   specified in the auto_prepend_file directive) is correct.
 * Let me know if this helps!
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Cannot do security optimization’ 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: [WFAdam](https://wordpress.org/support/users/wfadam/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/cannot-do-security-optimization/#post-13271286)
 * Status: resolved