{"id":52390,"date":"2016-11-29T19:40:41","date_gmt":"2016-11-29T19:40:41","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/virtual-robotstxt-littlebizzy\/"},"modified":"2018-08-25T07:57:49","modified_gmt":"2018-08-25T07:57:49","slug":"virtual-robotstxt-littlebizzy","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/virtual-robotstxt-littlebizzy\/","author":8897393,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.8","stable_tag":"1.0.8","tested":"4.9.29","requires":"4.4","requires_php":"7.0","requires_plugins":"","header_name":"Virtual Robots.txt","header_author":"LittleBizzy","header_description":"","assets_banners_color":"","last_updated":"2018-08-25 07:57:49","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.patreon.com\/littlebizzy","header_plugin_uri":"https:\/\/www.littlebizzy.com\/plugins\/virtual-robotstxt","header_author_uri":"https:\/\/www.littlebizzy.com","rating":5,"author_block_rating":0,"active_installs":500,"downloads":17233,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"5"},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1901932","resolution":"256x256","location":"assets"}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[2239,1332,6499,12753,10210],"plugin_category":[55],"plugin_contributors":[81153],"plugin_business_model":[],"class_list":["post-52390","plugin","type-plugin","status-closed","hentry","plugin_tags-edit","plugin_tags-editor","plugin_tags-robots","plugin_tags-robots-txt","plugin_tags-virtual","plugin_category-seo-and-marketing","plugin_contributors-littlebizzy"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/virtual-robotstxt-littlebizzy.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Replaces the default virtual robots.txt generated by WordPress with an editable one, and deletes any physical robots.txt file that may already exist.<\/p>\n\n<ul>\n<li><a href=\"https:\/\/www.patreon.com\/littlebizzy\"><strong>Patreon (support our free projects with $1\/mo and receive VIP support in our private Facebook group)<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.littlebizzy.com\/plugins\/virtual-robotstxt\">Plugin Homepage<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/littlebizzy\/virtual-robotstxt\">Plugin GitHub<\/a><\/li>\n<li><a href=\"https:\/\/slickstack.io\">SlickStack<\/a><\/li>\n<li><a href=\"https:\/\/starter.littlebizzy.com\">Starter<\/a><\/li>\n<li><a href=\"https:\/\/wplite.org\">wplite<\/a><\/li>\n<\/ul>\n\n<h4>The Long Version<\/h4>\n\n<p>Virtual Robots.txt is a simple WordPress plugin for easily editing the robots.txt content on your website. Because the goal of any CMS is to be as self-contained as possible, and because WordPress itself contains a default \"virtual\" robots.txt file generated by the <code>wp_options<\/code> table, it makes sense to maintain a virtual robots.txt whenever possible to make site management and migration more controlled.<\/p>\n\n<p>Instead of simply using the built-in robots_txt filter, however, this plugin creates a new hook for the main parse_query action to ensure that no other WordPress plugin (or theme) can alter the contents of robots.txt after it has been edited. Although the current version does not directly \"disable\" the robots_txt filter, in effect that filter is completely ignored by ending the hook sequence before robots_txt can be called.<\/p>\n\n<p>Unlike similar plugins (or WordPress itself), it includes a default \"allow all\" ruleset upon activation. The theory behind this is that playing things safe is always the best course of action for inexperienced webmasters; allowing all robots to access all site content is not only recommended by Google but also makes sense in the vast majority of cases. While the form value will persist on plugin deactivation, the option value will be completely deleted in the case of the plugin being removed from your site, in an effort at clean code and to avoid any confusion or conflicts.<\/p>\n\n<p>The plugin disables 100% the robots_txt filter because stops execution before this filter is triggered. It uses a very early hook \"parse_query\" that contains the context and, for a \/robots.txt request, echoes the form content and ends execution of PHP.<\/p>\n\n<p>The normal load sequence for <code>\/robots.txt<\/code> requests:<\/p>\n\n<pre><code>1. (load plugin hooks)\n2. init\n3. wp\n4. parse_query\n5. template_redirect\n6. robots_txt &lt;- filter\n<\/code><\/pre>\n\n<p>When using this plugin, the sequence changes:<\/p>\n\n<pre><code>1. (load plugin hooks)\n2. init\n3. wp\n4. parse_query &lt;- detect context via WP is_robots method, show the form content and ends execution.\n<\/code><\/pre>\n\n<h4>Compatibility<\/h4>\n\n<p>This plugin has been designed for use on LEMP (Nginx) web servers with PHP 7.0 and MySQL 5.7 to achieve best performance. All of our plugins are meant for single site WordPress installations only; for both performance and security reasons, we highly recommend against using WordPress Multisite for the vast majority of projects.<\/p>\n\n<h4>Plugin Features<\/h4>\n\n<ul>\n<li>Settings Page: Yes<\/li>\n<li>Premium Version Available: Yes (<a href=\"https:\/\/www.littlebizzy.com\/plugins\/seo-genius\">SEO Genius<\/a>)<\/li>\n<li>Includes Media (Images, Icons, Etc): No<\/li>\n<li>Includes CSS: No<\/li>\n<li>Database Storage: Yes\n\n<ul>\n<li>Transients: No<\/li>\n<li>Options: Yes<\/li>\n<li>Creates New Tables: No<\/li>\n<\/ul><\/li>\n<li>Database Queries: \/robots.txt + Backend (Options API)<\/li>\n<li>Must-Use Support: Yes (Use With <a href=\"https:\/\/github.com\/littlebizzy\/autoloader\">Autoloader<\/a>)<\/li>\n<li>Multisite Support: No<\/li>\n<li>Uninstalls Data: Yes<\/li>\n<\/ul>\n\n<h4>WP Admin Notices<\/h4>\n\n<p>This plugin generates multiple <a href=\"https:\/\/codex.wordpress.org\/Plugin_API\/Action_Reference\/admin_notices\">Admin Notices<\/a> in the WP Admin dashboard. The first is a notice that fires during plugin activation which recommends several related free plugins that we believe will enhance this plugin's features; this notice will re-appear approximately once every 6 months as our code and recommendations evolve. The second is a notice that fires a few days after plugin activation which asks for a 5-star rating of this plugin on its WordPress.org profile page. This notice will re-appear approximately once every 9 months. These notices can be dismissed by clicking the <strong>(x)<\/strong> symbol in the upper right of the notice box. These notices may annoy or confuse certain users, but are appreciated by the majority of our userbase, who understand that these notices support our free contributions to the WordPress community while providing valuable (free) recommendations for optimizing their website.<\/p>\n\n<p>If you feel that these notices are too annoying, than we encourage you to consider one or more of our upcoming premium plugins that combine several free plugin features into a single control panel, or even consider developing your own plugins for WordPress, if supporting free plugin authors is too frustrating for you. A final alternative would be to place the defined constant mentioned below inside of your <code>wp-config.php<\/code> file to manually hide this plugin's nag notices:<\/p>\n\n<pre><code>define('DISABLE_NAG_NOTICES', true);\n<\/code><\/pre>\n\n<p>Note: This defined constant will only affect the notices mentioned above, and will not affect any other notices generated by this plugin or other plugins, such as one-time notices that communicate with admin-level users.<\/p>\n\n<h4>Code Inspiration<\/h4>\n\n<p>This plugin was partially inspired either in \"code or concept\" by the open-source software and discussions mentioned below:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/robots-txt-file\/\">WordPress Robots.txt File<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/pc-robotstxt\/\">Virtual Robots.txt<\/a><\/li>\n<\/ul>\n\n<h4>Recommended Plugins<\/h4>\n\n<p>We invite you to check out a few other related free plugins that our team has also produced that you may find especially useful:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/404-to-homepage-littlebizzy\/\">404 To Homepage<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/cf-littlebizzy\/\">CloudFlare<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/delete-expired-transients-littlebizzy\/\">Delete Expired Transients<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-author-pages-littlebizzy\/\">Disable Author Pages<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-cart-fragments-littlebizzy\/\">Disable Cart Fragments<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-embeds-littlebizzy\/\">Disable Embeds<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-emojis-littlebizzy\/\">Disable Emojis<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-empty-trash-littlebizzy\/\">Disable Empty Trash<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-image-compression-littlebizzy\/\">Disable Image Compression<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-jq-migrate-littlebizzy\/\">Disable jQuery Migrate<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-search-littlebizzy\/\">Disable Search<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-wc-status-littlebizzy\/\">Disable WooCommerce Status<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-wc-styles-littlebizzy\/\">Disable WooCommerce Styles<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/disable-xml-rpc-littlebizzy\/\">Disable XML-RPC<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/download-media-littlebizzy\/\">Download Media<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/download-plugin-littlebizzy\/\">Download Plugin<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/download-theme-littlebizzy\/\">Download Theme<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/duplicate-post-littlebizzy\/\">Duplicate Post<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/export-database-littlebizzy\/\">Export Database<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/force-https-littlebizzy\/\">Force HTTPS<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/force-strong-hashing-littlebizzy\/\">Force Strong Hashing<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/ga-littlebizzy\/\">Google Analytics<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/index-autoload-littlebizzy\/\">Index Autoload<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/maintenance-mode-littlebizzy\/\">Maintenance Mode<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/profile-change-alerts-littlebizzy\/\">Profile Change Alerts<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/remove-category-base-littlebizzy\/\">Remove Category Base<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/remove-query-strings-littlebizzy\/\">Remove Query Strings<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/server-status-littlebizzy\/\">Server Status<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/sc-littlebizzy\/\">StatCounter<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/view-defined-constants-littlebizzy\/\">View Defined Constants<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/virtual-robotstxt-littlebizzy\/\">Virtual Robots.txt<\/a><\/li>\n<\/ul>\n\n<h4>Premium Plugins<\/h4>\n\n<p>We invite you to check out a few premium plugins that our team has also produced that you may find especially useful:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/www.littlebizzy.com\/plugins\/speed-demon\">Speed Demon<\/a><\/li>\n<li><a href=\"https:\/\/www.littlebizzy.com\/plugins\/seo-genius\">SEO Genius<\/a><\/li>\n<li><a href=\"https:\/\/www.littlebizzy.com\/plugins\/great-migration\">Great Migration<\/a><\/li>\n<li><a href=\"https:\/\/www.littlebizzy.com\/plugins\/security-guard\">Security Guard<\/a><\/li>\n<li><a href=\"https:\/\/www.littlebizzy.com\/plugins\/genghis-khan\">Genghis Khan<\/a><\/li>\n<\/ul>\n\n<h4>Special Thanks<\/h4>\n\n<p>We thank the following groups for their generous contributions to the WordPress community which have particularly benefited us in developing our own free plugins and paid services:<\/p>\n\n<ul>\n<li><a href=\"https:\/\/automattic.com\">Automattic<\/a><\/li>\n<li><a href=\"https:\/\/bradt.ca\">Brad Touesnard<\/a><\/li>\n<li><a href=\"http:\/\/www.danielauener.com\">Daniel Auener<\/a><\/li>\n<li><a href=\"https:\/\/deliciousbrains.com\">Delicious Brains<\/a><\/li>\n<li><a href=\"https:\/\/gregrickaby.com\">Greg Rickaby<\/a><\/li>\n<li><a href=\"https:\/\/ma.tt\">Matt Mullenweg<\/a><\/li>\n<li><a href=\"https:\/\/halfelf.org\">Mika Epstein<\/a><\/li>\n<li><a href=\"http:\/\/ottopress.com\">Samuel Wood<\/a><\/li>\n<li><a href=\"http:\/\/coffee2code.com\">Scott Reilly<\/a><\/li>\n<li><a href=\"https:\/\/profiles.wordpress.org\/jdembowski\">Jan Dembowski<\/a><\/li>\n<li><a href=\"https:\/\/perishablepress.com\">Jeff Starr<\/a><\/li>\n<li><a href=\"https:\/\/jeffc.me\">Jeff Chandler<\/a><\/li>\n<li><a href=\"https:\/\/jeffmatson.net\">Jeff Matson<\/a><\/li>\n<li><a href=\"https:\/\/jjj.blog\">John James Jacoby<\/a><\/li>\n<li><a href=\"https:\/\/leland.me\">Leland Fiegel<\/a><\/li>\n<li><a href=\"https:\/\/profiles.wordpress.org\/rahul286\">Rahul Bansal<\/a><\/li>\n<li><a href=\"https:\/\/roots.io\">Roots<\/a><\/li>\n<li><a href=\"https:\/\/rtcamp.com\">rtCamp<\/a><\/li>\n<li><a href=\"https:\/\/wpchat.com\">WP Chat<\/a><\/li>\n<li><a href=\"https:\/\/wptavern.com\">WP Tavern<\/a><\/li>\n<\/ul>\n\n<h4>Disclaimer<\/h4>\n\n<p>We released this plugin in response to our managed hosting clients asking for better access to their server, and our primary goal will remain supporting that purpose. Although we are 100% open to fielding requests from the WordPress community, we kindly ask that you keep the above mentioned goals in mind, thanks!<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to <code>\/wp-content\/plugins\/virtual-robotstxt-littlebizzy<\/code><\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>Check your WP Admin dashboard (admin users only) and footer area to view the statistics<\/li>\n<li>For Apache servers, it should work aotomatically<\/li>\n<li><p>For Nginx servers (without Apache in front) make sure <code>try_files<\/code> sends requests to WordPress:<\/p>\n\n<p>location = \/robots.txt {\n    try_files $uri $uri\/ \/index.php?$args;\n    allow all;\n    log_not_found off;\n    access_log off;\n}<\/p><\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li>Upload the plugin files to <code>\/wp-content\/plugins\/virtual-robotstxt-littlebizzy<\/code><\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>Check your WP Admin dashboard (admin users only) and footer area to view the statistics<\/li>\n<li>For Apache servers, it should work aotomatically<\/li>\n<li><p>For Nginx servers (without Apache in front) make sure <code>try_files<\/code> sends requests to WordPress:<\/p>\n\n<p>location = \/robots.txt {\n    try_files $uri $uri\/ \/index.php?$args;\n    allow all;\n    log_not_found off;\n    access_log off;\n}<\/p><\/li>\n<\/ol><\/dd>\n<dt>Does this plugin replace the need for my physical robots.txt file?<\/dt>\n<dd><p>Yes. Currently its a totally virtual robots.txt solution that will \"delete\" any physical robots.txt that exists. The reason for this is to make WordPress as self-contained as possible, and since there is no real downside to managing robots.txt in such a virtual fashion. In future versions, we may create the option to switch between either a virtual or physical file, but for now its totally virtual as explained.<\/p><\/dd>\n<dt>Does this plugin edit a physical robots.txt or only store a virtual robots.txt content?<\/dt>\n<dd><p>This plugin will NOT edit a physical robots.txt file and only offers a virtual robots.txt content via the wp_options table.<\/p><\/dd>\n<dt>How can I change this plugin's settings?<\/dt>\n<dd><p>Under the Settings menu on the left hand site, a new link is generated called Robots.txt<\/p><\/dd>\n<dt>Are there any performance drawbacks to using this plugin?<\/dt>\n<dd><p>Absolutely not. All wp_options are cached by default in WordPress and loaded prior to other data. In a theoretical world, a physical robots.txt file may in fact load more quickly, but all purposes both humans and robots wouldn't notice a difference when using a virtual file. Please note that if you are using CloudFlare or other special cache systems, you may need to clear those to see your robots.txt update correctly. However, traditional caches such as page cache plugins or oboject caching (i.e. Memcached or Redis) should not effect the content of this plugin.<\/p><\/dd>\n<dt>I'm using Nginx and this plugin is not working?<\/dt>\n<dd><p>Make sure you are sending requests for the static file robots.txt via your PHP proessor such as PHP-FPM:<\/p>\n\n<pre><code>location = \/robots.txt {\n    try_files $uri $uri\/ \/index.php?$args;\n    allow all;\n    log_not_found off;\n    access_log off;\n}\n<\/code><\/pre><\/dd>\n<dt>I have a suggestion, how can I let you know?<\/dt>\n<dd><p>Please avoid leaving negative reviews in order to get a feature implemented. Instead, we kindly ask that you post your feedback on the wordpress.org support forums by tagging this plugin in your post. If needed, you may also contact our homepage.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>updated plugin meta<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>added warning for Multisite installations<\/li>\n<li>updated recommended plugins<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>tested with WP 4.9<\/li>\n<li>added support for <code>DISABLE_NAG_NOTICES<\/code><\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>optimized plugin code<\/li>\n<li>added rating request notice<\/li>\n<li>updated recommended plugins<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>optimized plugin code<\/li>\n<li>updated recommended plugins<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>added recommended plugins notice<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>tested with WP 4.8<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>changed menu link name<\/li>\n<li>changed plugin folder name<\/li>\n<li>added helpful tips to settings page<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>initial release (non-public)<\/li>\n<\/ul>","raw_excerpt":"Replaces the default virtual robots.txt generated by WordPress with an editable one, and deletes any physical robots.txt file that may already exist.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/52390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=52390"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/littlebizzy"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=52390"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=52390"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=52390"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=52390"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=52390"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=52390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}