{"id":19146384,"url":"https://github.com/netzstrategen/wordpress-varnish-cache","last_synced_at":"2026-01-04T07:32:27.924Z","repository":{"id":53433506,"uuid":"169089824","full_name":"netzstrategen/wordpress-varnish-cache","owner":"netzstrategen","description":"WordPress Varnish integration plugin.","archived":false,"fork":false,"pushed_at":"2024-07-22T10:42:07.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-01-24T22:11:08.069Z","etag":null,"topics":["cache","php","varnish","varnish-cache","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netzstrategen.png","metadata":{"files":{"readme":"readme.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-04T14:22:10.000Z","updated_at":"2024-07-22T10:42:09.000Z","dependencies_parsed_at":"2024-11-09T07:44:07.642Z","dependency_job_id":"98181855-0f20-4d53-a1ac-c98714339b64","html_url":"https://github.com/netzstrategen/wordpress-varnish-cache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netzstrategen%2Fwordpress-varnish-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netzstrategen%2Fwordpress-varnish-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netzstrategen%2Fwordpress-varnish-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netzstrategen%2Fwordpress-varnish-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netzstrategen","download_url":"https://codeload.github.com/netzstrategen/wordpress-varnish-cache/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244287669,"owners_count":20428890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","php","varnish","varnish-cache","wordpress","wordpress-plugin"],"created_at":"2024-11-09T07:43:59.552Z","updated_at":"2026-01-04T07:32:27.898Z","avatar_url":"https://github.com/netzstrategen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"=== Varnish ===\nContributors: netzstrategen, tha_sun, techpriester, Ipstenu, DH-Shredder\nTags: varnish, cache, proxy, reverse-proxy, purge, ban, performance, speed, PageSpeed, caching\nRequires at least: 4.0\nTested up to: 4.9\nStable tag: 1.0.2\n\nIntegrates the Varnish Cache with WordPress.\n\n== Description ==\n\nThis plugin enables persistent caching of all content in Varnish with a very\nlong lifetime (TTL) while still publishing new and changed content sooner.\n\nWhen creating or editing a post, WordPress notifies Varnish by issuing PURGE\n(BAN) requests to remove all of the post's associated URLs from the cache, so\nthat they will be refetched from the (WordPress) backend when they are requested\nagain:\n\n- The post's own page URL, pagination, and comment feed\n- Listing pages of all public terms (categories including their parents, tags,\n  etc) associated with the post\n- Listing pages of the post's author\n- Site-wide feeds\n- The site's frontpage\n\n\u003ca href=\"https://www.varnish-cache.org/\"\u003eVarnish\u003c/a\u003e is a web application\naccelerator also known as a caching HTTP reverse proxy. You install it in front\nof your website and configure it to cache its contents. This plugin does not\ninstall Varnish for you, nor does it configure Varnish for WordPress.\n\nSite administrators are able to manually purge all content in Varnish using a\nbutton in the admin dashboard. On a multisite network, only network/super admins\nare able to purge manually.\n\nThis plugin is actively used by major publishing websites with millions of\npublished posts and thus considered mature enough to be used in production.\nHowever, patches and improvements are always welcome,\n\u003ca href=\"https://github.com/netzstrategen/wordpress-varnish\"\u003edevelopment happens\non GitHub\u003c/a\u003e.\n\n\n== Installation ==\n\n1. Install and activate the plugin as usual.\n\n2. Configure the IP address and optionally port of your Varnish server in the\n   `VARNISH_HOST` constant in your `wp-config.php`:\n   ```\n   const VARNISH_HOST = 'http://127.0.0.1:8080';\n   ```\n\n\n= Requirements =\n\n* PHP 7.0 or later.\n* Varnish 3.x or later.\n* Pretty Permalinks.\n\n\n== Frequently Asked Questions ==\n\n= What versions of Varnish are supported? =\n\nEvery version above Varnish 3.\n\n\n= Why doesn't every page refresh when I make a new post? =\n\nOnly relevant URLs are selectively invalidated in the cache in order to serve\nall other existing pages as quickly as possible and avoid slow response times\nand a high load on the webserver whenever content changes.\n\nThe only way to improve this in the future would be to implement full support\nfor Varnish Cache Tags. However, this would have to be supported from the entire\napplication (WordPress Core) to work flawlessly. (See Drupal 8+ or the ambitious\n\u003ca href=\"https://wordpress.org/plugins/pantheon-advanced-page-cache/\"\u003ePantheon Advanced Page Cache\u003c/a\u003e\nfor an example of such efforts.)\n\nHowever, a simplified \"flush all upon any change\" option would be possible and\ncould be added if there is sufficient interest.\n\n\n= Why are my theme changes not visible? =\n\nOnly content that is updated through the WordPress application causes relevant\nURLs to be purged in the Varnish cache.\n\nAfter changing code or doing anything else outside of WordPress API functions\nyou need to manually purge all affected content from the cache. You may use the\nlinks to flush all content in the administration to do so.\n\nAlternatively, use the following command to purge only files in your theme:\n\n```\ncurl -X PURGE -H 'Host: example.com' -H 'X-Purge-Method: regex' 'http://127.0.0.1/wp-content/themes/mytheme/.*'\n```\n\n\n= How do I manually purge the whole cache? =\n\nAs a user with administrator privileges, you can click the button \"Manually\nflush cache\" button on the administrative dashboard.\n\nIf you do not see the button, you do not have sufficient privileges.\n\nIn a multisite installation, only network/super administrators are able to\nmanually purge the full cache, as that affects all sites in the cache.\n\n\n= Can I use this with a CDN or proxy service like CloudFlare? =\n\nYes, but when you use CloudFlare or similar services, you have a proxy server in\nfront of the Varnish cache, which is a (reverse) proxy on its own. Ensure to\nset the proper IP address of your Varnish cache (and not the one of the CDN) in\nyour wp-config.php.\n\n\n= How do I find my Varnish IP address? =\n\nThe IP addresses from which Varnish can be purged are configured in your VCL,\ncheck the configuration for e.g. `acl purge`.\n\nIf your Varnish server listens to multiple IPs, pick the private IP address that\ncan be accessed from the network of your webserver.\n\nAlso make sure to include the port (unless Varnish listens on 80), for example:\n```\nconst VARNISH_HOST = 'http://127.0.0.1:8080';\n```\n\n\n= How do I configure my Varnish VCL? =\n\nSupport on configuring Varnish is not provided by this plugin. Please contact\nyour hosting provider instead.\n\nYour Varnish configuration must support PURGE/BAN requests. Helpful examples may\nbe contributed and found in the\n\u003ca href=\"https://github.com/netzstrategen/wordpress-varnish/wiki\"\u003eVarnish Plugin Wiki\u003c/a\u003e.\n\n\n= How does this plugin differ from Proxy Cache Purge / varnish-http-purge? =\n\n_Proxy Cache Purge/Varnish HTTP Purge_ was authored for the masses and attempts\nto support users on-screen with basic setup questions, and thus carries a lot of\nunnecessary weight for a performance plugin that is supposed to make your site\nfaster (but unnecessary features make it slower). In addition, the plugin's code\nand architecture was never overhauled and modernized for standards and\nperformance.\n\nThe Varnish plugin follows a different approach and focuses on performance only.\n\nUltimately, the goal is to hide the whole infrastructure scaling problem away\nfrom the users. The button(s) to manually purge the cache are unwanted and can\nhopefully be removed soon.\n\n\n== Changelog ==\n\n= 1.0.0 =\nRefactored the plugin code inherited from varnish-http-purge to establish a\nmodern and fast plugin architecture.\n\nAPI changes:\n\n* Constant `VHP_VARNISH_IP` in wp-config.php has been renamed to `VARNISH_HOST`\n  and includes the protocol/schema and optionally port now:\n```diff\n-const VHP_VARNISH_IP = '127.0.0.1';\n+const VARNISH_HOST = 'http://127.0.0.1:8080';\n```\n\n* Filter 'varnish_http_purge_schema' has been removed.\n\n* Filter 'vhp_purge_urls' has been renamed to 'varnish/purge/post':\n```diff\n-add_filter('vhp_purge_urls', ...)\n+add_filter('varnish/purge/post', ...)\n```\n\n* Class VarnishPurger no longer exists; use the appropriate filters to purge\n  further URLs instead (or create PRs to suggest new integration points).\n\n* Action 'after_purge_url' has been renamed:\n```diff\n-add_action('after_purge_url', ...);\n+add_action('varnish/purge-url/after', ...);\n```\n\n\nThe varnish-cache plugin was originally forked from\n\u003ca href=\"https://wordpress.org/plugins/varnish-http-purge/\"\u003evarnish-http-purge\u003c/a\u003e\nv3.7.3 in 2015. Credits go to the original authors for the initial integration\nideas.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetzstrategen%2Fwordpress-varnish-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetzstrategen%2Fwordpress-varnish-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetzstrategen%2Fwordpress-varnish-cache/lists"}