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?
- Security headers disappear on WordPress pages
- Why is this line of code Wrong in every WordPress .Htaccess security article?
- How to redirect all HTTP requests to HTTPS
- How to change permissions for a folder and its subfolders/files in one step
- How to change permissions for a folder and its subfolders/files in one step
- cd into directory without having permission
- Best collection of code for your .htaccess file [closed]
- Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error
- Moving a WP Multisite to a subdirectory
- Default .htaccess file for WordPress?
- What are the recommended database permissions for WordPress?
- Which one does WordPress prioritize when it comes to php.ini, wp-config and .htaccess?
- Security and .htaccess
- WordPress site hacked. Has .htaccess been hacked?
- htaccess problem after saving Settings
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- Stop WordPress and Plugins from Overwriting .htaccess
- Move WordPress to subdirectory, keep ALL URLs
- How to stop wordpress from changing default .htaccess permissions to 444
- Change Login URL Without Plugin
- Permissions to wp-content folder in Windows Server 2012
- htaccess disable WordPress rewrite rules for folder and its contents
- htaccess rewrite conflict with wordpress rules and ssl
- Non-WordPress page in subdirectory under WordPress page
- What permissions does wp-content/uploads need?
- htaccess https redirect from www to non-www
- What does a security risk in a plugin look like?
- Permalink Issues by Installing WordPress in Subdirectory / Subfolder
- Htaccess for Wordpess set on single subdomain
- Securing wp-admin folder – Purpose? Importance?
- adding rewrite rules in .htaccess
- .htaccess and 500 error, extra character added
- WordPress .htaccess subdirectory problem
- Name-based virtual host configuration in Apache seems to cause a “500 Internal Server Error”
- Site redirects to wrong url when saving settings
- How to get WordPress to save upload file beyond web root [closed]
- Static raw HTML page
- WordPress + Magento .htaccess ReWriteRule Issue (www vs. non-www)
- Plugin to edit htaccess file
- htaccess rewrite for author query string when WP is in subfolder