Title: Prevent PHP Execution &#8211; Exceptions
Last modified: March 22, 2021

---

# Prevent PHP Execution – Exceptions

 *  Resolved [gabrielem](https://wordpress.org/support/users/gabrielem/)
 * (@gabrielem)
 * [5 years ago](https://wordpress.org/support/topic/prevent-php-execution-exceptions/)
 * hi, I’m trying to add some exceptions to Prevent PHP Execution, but something
   doesn’t work. I correctly add the paths, I press the update .htaccess file button
   but nothing happens. I refresh the page and no exceptions. can you help me find
   a solution?

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

 *  Plugin Support [Dmytro – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport16/)
 * (@wpmudevsupport16)
 * [5 years ago](https://wordpress.org/support/topic/prevent-php-execution-exceptions/#post-14229785)
 * Hi there [@gabrielem](https://wordpress.org/support/users/gabrielem/)
 * There is indeed a known issue when you add a new rule in the Exceptions field
   in Defender, it unfortunately overwrites any existing exception rule you may 
   have previously added. The developers are aware of that issue and are working
   on a fix for a future update.
 * However, if you manually add the rule to your .htaccess file as follows, does
   it save properly?
 *     ```
       <Files home/user/public_html/wp-content/filename.php>
       Require all granted
       </Files>
       ```
   
 * Please do let us know if this helps.
 * Cheers!
    Patrick
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years ago](https://wordpress.org/support/topic/prevent-php-execution-exceptions/#post-14246032)
 * Hi [@gabrielem](https://wordpress.org/support/users/gabrielem/)
 * I hope you are doing well and safe!
 * We haven’t heard from you in a while, I’ll mark this thread as resolved.
 * Feel free to let us know if you have any additional question or problem.
 * Best Regards
    Patrick Freitas

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

The topic ‘Prevent PHP Execution – Exceptions’ is closed to new replies.

 * ![](https://ps.w.org/defender-security/assets/icon-256x256.gif?rev=3435930)
 * [Defender Security - Malware Scanner, Login Security & Firewall](https://wordpress.org/plugins/defender-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/defender-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/defender-security/)
 * [Active Topics](https://wordpress.org/support/plugin/defender-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/defender-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/defender-security/reviews/)

## Tags

 * [exceptions](https://wordpress.org/support/topic-tag/exceptions/)

 * 2 replies
 * 3 participants
 * Last reply from: [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/prevent-php-execution-exceptions/#post-14246032)
 * Status: resolved