Created
August 27, 2025 16:45
-
-
Save ideadude/c36a0a726b094814a27e447c7adc786a to your computer and use it in GitHub Desktop.
Block direct execution of PHP inside wp-content/plugins or wp-content/themes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Block direct execution of PHP inside wp-content/plugins or wp-content/themes | |
| # Add these lines above the WP core rules in .htaccess. | |
| RewriteEngine On | |
| RewriteRule ^wp-content/plugins/[^/]+/.*\.php$ - [F,L] | |
| RewriteRule ^wp-content/themes/[^/]+/.*\.php$ - [F,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment