WordPress Hardening – Securing wp-includes & wp-admin
-
Hi,
I’ve implemented many steps mentioned in WordPress hardening article: https://wordpress.org/documentation/article/hardening-wordpress/#disable-file-editing
Just wondering if anyone has used the below code to secure wp-incudes, and if so it’s been known to cause any problems? And if it’s easy to reverse by deleting the code from .htaccess?
There’s just so little on this code online:
# Block the include-only files. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^wp-admin/includes/ - [F,L] RewriteRule !^wp-includes/ - [S=3] RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] RewriteRule ^wp-includes/theme-compat/ - [F,L] </IfModule>Additionally, if you password protect the wp-admin page, it stops AJAX and can break features in plugins etc. If you use the below code it still allows AJAX:
<Files admin-ajax.php> Order allow,deny Allow from all Satisfy any </Files>Seems to work, and no errors. But wondering if this is just band-aiding the AJAX problem. Has anyone got any experience using this too?
Thanks
The topic ‘WordPress Hardening – Securing wp-includes & wp-admin’ is closed to new replies.