This file and the copy in wp-content/plugins/
was added 2009 to prevent directory browsing even when the server allows that.
This isn’t really a security feature, except in the sense of security by obscurity, but there might be files not everyone wants to see published or indexed by search engines.
A better solution is: turn directory listing off (Apache, nginx, IIS) and disallow crawling of these files – even when there are links to single files – in your robots.txt
:
User-agent: *
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/themes
Related Posts:
- How to move page template files like page-{slug}.php to a sub-directory?
- What WP folder can I use to write files to?
- get_stylesheet_directory() returns wrong URI… localhost/using vhosts
- Retrieve the template directory URI via global or get_template_directory_uri() every time?
- Move my theme style.css into a folder
- When developing a distributable Theme, does it HAVE to be “inheritable”?
- Can wordpress run in root of existing php site with no theme on index.php but all other WP posts/pages?
- Add a theme via symlink
- Loading files for theme and child theme (Require)
- WordPress page templates in a directory
- Is it possible to make *.js and folders visible in theme-editor
- How do I include a partial from a directory below a wordpress theme directory?
- get main URL from subdirectory with php
- Make theme editor to show all theme’s files
- Extracting Distance from FacetWP Proximity Function to Display in WordPress Template
- How to create .pot files with POedit?
- How do I get the theme URL in PHP?
- Why when I submit a form in wordpress it loads a 404 page though URL is correct
- What is the constant WP_USE_THEMES for?
- What is the difference between front-page.php and home.php? [duplicate]
- Any alternate TinyMCE4 themes / subthemes?
- Strict Standards Error bootstrap navwalker
- wp_get_attachment_image_attributes not working for me
- Specify image dimensions
- Adding Action Hooks In Parent Theme For Easier Child Theme Customization
- register_sidebar ignores ‘id’ and ‘class’
- add_editor_style not working
- Add colors to existing color palette without replacing it
- How to hide and content from auto-generated excerpts?
- How can I include a post in a theme?
- Custom CSS In Uploads Folder
- Default header image does not display
- How to write .htaccess dynamically? [closed]
- Adding wp_enqueue_media(); causes problem
- A guide or tool for inserting bootstrap in underscores theme? [closed]
- What is the correct way to do a mobile theme for WordPress?
- What is the right way to make custom main page?
- .sub-menu or .children?
- Custom CSS without css.php file
- Is there a need for nonce with Post Metabox?
- Script only partially runs on theme activation, but runs fully on deactivation?
- How to echo category_description() without stripping out html tags?
- Understanding WordPress(framework?) Web Development
- Stylesheet not linking
- How to control layout of posts on page?
- saving row as a template using WPBakery Page Builder is not working [closed]
- Custom metabox for custom page template
- Display recent posts with thumbnail
- Primary navigation menu & footer not showing in category / tag page
- create category on theme setup
- Exclude read more in the_excerpt [closed]
- Recommended method for updating/adding menus when adding new theme
- How to add custom meta box under Gallery Settings in the “Edit Gallery” popup
- How do I turn a post thumbnail into a background image?
- Alternative to file_get_contents() for theme operations
- How to use add_theme_support(‘html5’)?
- Can I Set Up Session in WordPress Custom Page
- Updating a live theme safely?
- How do I remove inline style in featured image markup?
- How to list articles by year based on url?
- Change Responsive Images Maximum Width of 1600px
- Why is my CSS not loading?
- How to make theme configurable
- How can I hard code my sidebar?
- wp_nav_menu with default pages menu
- Theme customizer – can’t add section/settings
- StoreFront WordPress theme: How can i create a new Home page with Custom design same as template [closed]
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- using Options Framework – can “theme-textdomain” domain be changed?
- How to add sidebar to Isola theme? [closed]
- Unable to add widgets to sidebars in custom theme
- View list of all attachments on site
- How do I display a greyed out next_post_link when there is no next post
- What is the difference between Twenty eleven & roots framework?
- Woocommerce AJAX filters option loading spiner – problem on mobile device
- How to Modify WP_Includes/blocks/latest_posts.php
- Adding popup support to the theme
- How do I change the color of individual page titles in WordPress?
- Page For Specific Posts
- How toprint informations in footer
- How to implement pagination in category.php template
- How to reduce the vertical space above and below a ul list uniformly with one command?
- How can I show a custom WordPress menu anywhere I want on my website?
- WordPress Menu item > Sub menu Class update
- How to know and change the machine name of a menu?
- How does mediaelement.js work in WordPress?
- Images use & location, on new wordpress theme
- WordPress Theme Developments – Start from another theme
- Access meta box checked value in another file
- Slider should be display in home template [closed]
- How does offset works on pagination? (get_results)
- Plugin or script to apply updated media settings to all featured images
- Header links also appearing in the footer
- Extending arrays in parent theme without completely overriding the files
- WordPress Subpages Fancybox Trouble
- Toolbox theme using printif statement – help needed understanding code block
- How to Create a Multi Purpose Theme?
- customize functionality of share buttons under each blog post [closed]
- How to set up a development/staging site to make major changes to the theme then update on the live site?
- What is the point of using the front-page.php template? [closed]