{"id":8529,"date":"2010-03-23T18:45:54","date_gmt":"2010-03-23T18:45:54","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wordpress-varnish\/"},"modified":"2013-09-13T21:04:19","modified_gmt":"2013-09-13T21:04:19","slug":"wordpress-varnish","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/wordpress-varnish\/","author":5808387,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.8","stable_tag":"trunk","tested":"3.6.1","requires":"2.9.2","requires_php":"","requires_plugins":"","header_name":"WordPress Varnish","header_author":"<a href=\"http:\/\/github.com\/pkhamre\/\">P\u00e5l-Kristian Hamre<\/a>","header_description":"","assets_banners_color":"","last_updated":"2013-09-13 21:04:19","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/github.com\/pkhamre\/wp-varnish","header_plugin_uri":"http:\/\/github.com\/pkhamre\/wp-varnish","header_author_uri":"","rating":5,"author_block_rating":0,"active_installs":20,"downloads":9873,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.8":"<ul>\n<li>Added secret handling to WPVarnishPurgeObject, Thanks Kit Westneat<\/li>\n<\/ul>","0.7":"<ul>\n<li>Added purge when post changes from future to publish, Thanks Marcin Pietrzak<\/li>\n<li>Added purge when theme switched, Thanks dupuis<\/li>\n<\/ul>","0.6":"<ul>\n<li>Removed plugins_loaded action as it doesnt do what was expected re: Issue<\/li>\n<\/ul>","12. Thank you Ben Favre, Pothi Kalimuthu and allinwonder":"","0.5":"<ul>\n<li>New .vcl to fix purge as per Issue #39, Thanks Ed Cooper<\/li>\n<\/ul>","0.3":"<ul>\n<li>Varnish PURGE configuration must support regex. wp-varnish will\nsometimes request with regex for special purges like refreshing\nall blog cache and refreshing comments.<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"3"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1573769","resolution":"1","location":"plugin"}},"screenshots":{"1":"Screenshot of the adminstration interface."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[146,144,247,7914,3886],"plugin_category":[52,54],"plugin_contributors":[83017,83015,83016],"plugin_business_model":[],"class_list":["post-8529","plugin","type-plugin","status-closed","hentry","plugin_tags-cache","plugin_tags-caching","plugin_tags-performance","plugin_tags-purge","plugin_tags-varnish","plugin_category-performance","plugin_category-security-and-spam-protection","plugin_contributors-eitch","plugin_contributors-pkhamre","plugin_contributors-wfelipe","plugin_committers-pkhamre"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wordpress-varnish.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wordpress-varnish\/trunk\/screenshot-1.png?rev=1573769","caption":"Screenshot of the adminstration interface."}],"raw_content":"<!--section=description-->\n<p>This plugin purges your varnish cache when content is added or edited. This\nincludes when a new post is added, a post is updated or when a comment is\nposted to your blog.<\/p>\n\n<p>To keep widgets like \"Recent posts\", \"Recent comments\" and such up to date,\nyou should consider using ESI and include them through a text widget for\narbitrary text or HTML.<\/p>\n\n<!--section=installation-->\n<p>This section describes how to install the plugin and get it working.<\/p>\n\n<ol>\n<li>Install the plugin 'WordPress Varnish' through the 'Plugins' menu in\nWordPress<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Does this just work?<\/dt>\n<dd><p>Yes.<\/p><\/dd>\n<dt>But how should my varnish configuration file look like?<\/dt>\n<dd><p>I have provided a simple VCL that can be used as a reference.<\/p><\/dd>\n<dt>Does it work for Multi-Site (or WPMU)?<\/dt>\n<dd><p>Yes. Activating the plugin site-wide will provide the functionality to all\nblogs. Configuration can be done on the blogs individually, or can be global.\nIf you want to configure Varnish servers globally, edit wp-config.php and\ninclude these lines just before \"That's all, stop editing!\" message:<\/p>\n\n<p>global $varnish_servers;\n$varnish_servers = array('192.168.0.1:80:secret','192.168.0.2:80:secret');\ndefine('VARNISH_SHOWCFG',1);<\/p>\n\n<p>The varnish servers array will configure multiple servers for sending the\npurges. If VARNISH_SHOWCFG is defined, configuration will be shown to all\nusers who access the plugin configuration page (but they can't edit it).<\/p><\/dd>\n<dt>My Plugins are seeing the Varnish server's IP rather than the websurfer IP<\/dt>\n<dd><p>You could install Apache's mod_rpaf module: http:\/\/stderr.net\/apache\/rpaf\/<\/p>\n\n<p>or, in wp-config.php, near the top, put the following code:<\/p>\n\n<pre><code>$temp_ip = explode(',', isset($_SERVER['HTTP_X_FORWARDED_FOR'])\n? $_SERVER['HTTP_X_FORWARDED_FOR'] :\n(isset($_SERVER['HTTP_CLIENT_IP']) ?\n$_SERVER['HTTP_CLIENT_IP'] : $_SERVER['REMOTE_ADDR']));\n$remote_addr = trim($temp_ip[0]);\n$_SERVER['REMOTE_ADDR'] = preg_replace('\/[^0-9.:]\/', '', $remote_addr );\n<\/code><\/pre>\n\n<p>The code takes some of the common headers and replaces the REMOTE_ADDR\nvariable, allowing plugins that use the surfer's IP address to see the\nsurfer's IP rather than the server's IP.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.8<\/h4>\n\n<ul>\n<li>Added secret handling to WPVarnishPurgeObject, Thanks Kit Westneat<\/li>\n<li>Change WPVarnishPurgePurgeCommonObjects to WPVarnishPurgeCommonObjects,\nThanks kitwestneat<\/li>\n<li>added @ to supress Undefined offset notice<\/li>\n<li>minor doc changes<\/li>\n<\/ul>\n\n<h4>0.7<\/h4>\n\n<ul>\n<li>Added purge when post changes from future to publish, Thanks Marcin Pietrzak<\/li>\n<li>Added purge when theme switched, Thanks dupuis<\/li>\n<li>Fixed multisite domain mapping purge, Thanks jasonheffner<\/li>\n<li>Updated Finnish Translation, Thanks timoleinio<\/li>\n<\/ul>\n\n<h4>0.6<\/h4>\n\n<ul>\n<li>Removed plugins_loaded action as it doesnt do what was expected re: Issue\n#12. Thank you Ben Favre, Pothi Kalimuthu and allinwonder<\/li>\n<\/ul>\n\n<h4>0.5<\/h4>\n\n<ul>\n<li>New .vcl to fix purge as per Issue #39, Thanks Ed Cooper<\/li>\n<\/ul>\n\n<h4>0.4<\/h4>\n\n<ul>\n<li>added rule to skip caching 404s in vcl<\/li>\n<li>WordPress-Varnish UserAgent as per ticket #23<\/li>\n<li>document use of mod_rpaf or code fix for remote IP, Ticket #36<\/li>\n<li>clean data rather than reject to fix ticket #31<\/li>\n<li>added plugins_loaded hook to fix ticket #12<\/li>\n<\/ul>\n\n<h4>0.3<\/h4>\n\n<ul>\n<li>Added internationalization code. Included pt_BR translation.<\/li>\n<li>Support to Multi-Site and WPMU with global configuration.<\/li>\n<li>Fix on URL purges for multiple domains and blogs on sub-directories.<\/li>\n<li>Code clean up on some functions.<\/li>\n<li>Added configuration for purging all blog, page and comments navigation.<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>Added multiple servers support and timeout configuration.<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"WordPress Varnish is a simple plugin that purges new and edited content.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/8529","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=8529"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pkhamre"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=8529"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=8529"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=8529"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=8529"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=8529"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=8529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}