Everyone peoples can easily acess to my wp-includes how can i hide or not visible files to users can anybody help me regarding it this is my wordpress website link see everybody can see this
Everyone peoples can easily acess to my wp-includes how can i hide or not visible files to users can anybody help me regarding it this is my wordpress website link see everybody can see this https://pifserver.ml/wp-includes
Considering you got an Apache server, use this full code in the .htaccess file:
# 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>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
As a bonus, I would also add this:
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>