The PHP files in the wp-includes directory will do nothing when accessed directly. They are designed to be include()‘d in an existing PHP script, such as on the front-end or in the dashboard.
Your Options -Indexes entry in the .htaccess file simply prevents a list of the files in a directory when no index.php is present. It’s good practice to use this on a live server. I’m not entirely sure what the second line does; you should most likely remove it.
If you’re especially concerned about people attacking your server, you can prevent access to the wp-includes directory completely. To do this, create a .htaccess file inside the wp-includes folder with the following content:
Deny from all
Related Posts:
- Which WordPress scripts need to be executable for a fresh installation?
- Restricting user login by IP address
- Disable directory browsing of uploads folder
- Improve wordpress security by hiding non public resources
- Does this .htaccess security setting really work?
- Place static HTML files in path below WordPress page
- .htaccess for wordpress inside another wordpress install
- Isolating WordPress to a subfolder
- Permalinks not working on second wordpress installed in a subdirect
- Move wordpress to folder without changing urls
- Change wp-content without changing the name of the folder
- Using “wordpress_logged_in” to restrict direct access to uploads folder in 2021
- How to restrict access to wp-content, wp-includes and all sub-folders
- WordPress URL/Folder ReWrite using Htaccess
- Redirect main domain to subdirectory
- Blocking access to wp-login via htaccess not working
- Exclude subfolder from WP-redirect works with html but not php files
- Attach to wp-login.php and xmlrpc.php
- XMLRPC filtering through htaccess not working
- Can’t Access Subdirectory
- WordPress: Adding Security
- Fixing custom 404 pages broken by WordPress in a subdirectory
- WP install in sub-dir white screen
- How do I test to ensure that my wp-config file is protected?
- WordPress not seeing .htaccess rules
- Drawbacks to using Options -Indexes
- WordPress installed in root, need second in subdirectory with different domain
- Rules in .htaccess only if the requested URL is /wp-admin
- htaccess, site and staging in subdirectories
- External content won’t load in iframe in Safari
- I have a page using a pretty url and a mod_rewrite rule matching it. I expected it to give an error but it’s working. Why?
- Strange behaviour of is_user_logged_in() and get_current_user_id()
- Creating a copy of a website in a subdirectory, wp-admin redirect problem
- Access sub-domain when root public_html is protected with .htaccess password
- Centos 7.2 wordpress on going to /admin shows Forbidden You don’t have permission to access /wordpress/wp-admin/ on this server
- wp-content – permissions for files/folders created by apache
- Cannot access subdirectory subpages
- Selectively Disabling PHP via .htaccess in Root Directory
- How to execute WordPress as though it is in the root folder while it is installed in a subdirectory?
- WP Codex answer incomplete? Put WP in subdirectory. .htaccess change required
- Should I prevent access to .htaccess and wp-config.php files?
- Blocking wp-login in HTACCESS has also blocked password protected pages
- Basic Auth .htaccess on wp-login, but allow logout from woocommerce
- Using htaccess to prevent spam through wp-comments-post.php
- Install second wordpress in root subfolder, Error 404
- Remove subdirectory from links
- How to properly give WordPress its own directory
- htaccess- to hide subdirectory slug only from the post
- How to direct users to a subcatalog
- Avoid ‘uploads’ 777 permissions: Potential threat or clean solution?
- Installing wordpress on subdirectory 2 levels down
- Cannot Override WordPress 404 for a Sub-Directory
- htaccess mod_rewrite not working
- How can I create a private site that is inaccessible from the outside?
- .htaccess and virtual host configuration for WP in its own directory
- Giving WordPress it’s own directory and using .htaccess Directory Index
- Restrict Content for only Contributors via .htaccess
- Allowing access to certain WordPress created pages or posts with htaccess / htpasswd
- Debug errors for “Destination directory for file streaming does not exist or is not writable”
- Hardening WordPress – how to set .htaccess permissions?
- Why is this line of code Wrong in every WordPress .Htaccess security article?
- What are the recommended database permissions for WordPress?
- Non-WordPress page in subdirectory under WordPress page
- What permissions does wp-content/uploads need?
- Name-based virtual host configuration in Apache seems to cause a “500 Internal Server Error”
- Suppress subdirectory from WordPress Multisite primary URL
- What is the role of .htaccess file in WordPress?
- Remove File Extension for Page Outside of WordPress
- different child theme for subdomain
- Should I add the IP of the server that hosts my sites to the list of authorized IPs in the wp-admin/.htaccess?
- Block only external access to wp-cron.php on OpenLiteSpeed
- WordPress On subfolder
- Changes to .htaccess not updating the file (old rules still take effect)
- Override htacces rule only for specific directory
- How To Allow Only Specific User Agent To Access a URL?
- How can I enable keep alive (Not accessing to Apache)
- htaccess has broken my site
- TimThumb & htaccess : clean url
- Only Allow Front End Access
- .htacess rewrite condition: page to seconddomain/page
- ReDirect subfolder link to another sub-folder and force SSL
- Password protect directory but not files
- Privilege escalation bugs in 2.9?
- fix 302 redirection error on https
- Rewrite URL in address bar for a specific page [closed]
- Home links redirects to old site
- Rewriting subfolders to specific parent folder in WordPress
- Azure WordPress deny access to xmlrpc
- Deny,Allow on .htaccess isn’t working
- modifying htaccess for localhost with a custom port
- .htaccess redirects for posts in new directory and new domain
- domain.in/wp-admin give the result to 403 Access to this resource on the server is denied!
- Redirect from domain.com to subdomain.domain.com
- How do I block a subdirectory from WordPress theming?
- MAMP.app & .htaccess – Can’t override after config
- Restricting direct downloads of wp content files, but allow them on the website.
- Forward blog requests to another URL
- Couple questions about .htaccess, login page, updates
- .htaccess rewrite rule stopped working for wordpress site after moving server
- Directory to store secure file