Title: Page cache purge tools
Author: WordPress VIP Documentation
Published: December 17, 2020
Last modified: June 11, 2026

---

 1. [Caching](https://docs.wpvip.com/caching/)
 2. [Page cache](https://docs.wpvip.com/caching/page-cache/)
 3. [Purge the page cache](https://docs.wpvip.com/caching/page-cache/purging/)
 4. Page cache purge tools

#  Page cache purge tools

The page cache serves cached versions of responses from WordPress and Node.js applications,
static assets that are deployed from an application’s code repository, and a site’s
files that are served from [the VIP File System](https://docs-admin-wpvip-com-staging-content.go-vip.net/docs-vip/vip-file-system/).

Cached content can be selectively purged on demand in the VIP Dashboard, with VIP-
CLI, or in a site’s WordPress Admin Toolbar or dashboard.

Cached resource URLs can be purged for:

 * Posts and pages
 * REST API endpoints
 * Deployed static assets such as images, CSS, and JS files
 * Files that are stored in the [VIP File System](https://docs.wpvip.com/vip-go-files-system/)

**Note**

When purging a URL from the page cache, all variants of the URL’s `GET` parameters
will also be purged. Purging a post with slug `hello-world` will also purge other
cached variants such as `/hello-world/?a=1&b=1` as well as `/hello-world/?b=1&a=
1`. It is not possible to purge a specific variant of a URL without purging all 
if its other variants.

## Purge by URL

 * VIP Dashboard
 * VIP-CLI
 * WordPress Admin Toolbar
 * WordPress Admin dashboard

Cached responses for site URLs on a WordPress or Node.js environment can be purged
from the cache in the **Purge Page Cache** panel of the VIP Dashboard.

Up to 4,000 URLs that share the same domain can be purged at one time.

**Prerequisites**

A user must have at minimum an [Org admin role](https://docs.wpvip.com/manage-user-access/vip-dashboard/org-roles/)
or an [App admin role](https://docs.wpvip.com/manage-user-access/vip-dashboard/app-role/)
for that application.

The **Purge Page Cache** panel is environment-specific (e.g., Production, Develop).

 1. Navigate to the [VIP Dashboard](https://dashboard.wpvip.com/) for an application.
 2. Select an environment from the environment dropdown located at the upper left of
    the VIP Dashboard.
 3. Select “**Performance**” from the sidebar navigation at the left of the screen.
 4. Select **“Cache”** from the submenu.
 5. Enter one or more URLs sharing the same domain in the “**URLs**” text field. Multiple
    URLs must be separated per line by return values.
 6. Select the “**Purge**” button to purge the URLs from the page cache.

Up to 4,000 URLs can be purged at one time.

Purge the cache for one or more URLs (up to 4,000) that share the same domain with
the [VIP-CLI](https://docs.wpvip.com/vip-cli/) command `[vip cache purge-url](https://docs.wpvip.com/vip-cli/commands/cache/purge-url/)`.

**Prerequisites**

 * [VIP-CLI is installed](https://docs.wpvip.com/vip-cli/installing-vip-cli/) and
   has been updated to [the most current version](https://www.npmjs.com/package/@automattic/vip/v/latest).
 * A user must have at minimum an [Org admin role](https://docs.wpvip.com/manage-user-access/vip-dashboard/org-roles/)
   or an [App write role](https://docs.wpvip.com/app-role/) for that application.

If multiple URLs are passed in the command, they must be separated by a single space.

    ```wp-block-preformatted
    vip @<app>.<env> cache purge-url <url> <url>
    ```

**VIP-CLI command examples**

For demonstration purposes, the `<app-name>` value `example-app` and the `<env>`
value `develop` are used in the VIP-CLI command examples below. Read more about 
[how to target environments in VIP-CLI commands](https://docs.wpvip.com/vip-cli/target-environments/).

In this command example, two URLs hosted on the develop environment of the “example-
app” application are purged in a single VIP-CLI command:

    ```wp-block-preformatted
    $ vip @example-app.develop cache purge-url https://dev.example.com/page-path/ https://dev.example.com/wp-content/uploads/2020/12/example.png
    - Purged URL: https://dev.example.com/page-path/
    - Purged URL: https://dev.example.com/wp-content/uploads/2020/12/example.png
    ```

URLs with parameter strings may need to be passed to the `vip cache purge-url` command
within quotation marks. For example:

    ```wp-block-preformatted
    vip @example-app.develop cache purge-url "https://dev.example.com/page-path/?a=b"
    ```

Purging a URL with parameter strings purges all other cached variants of that URL.

### `--from-file`

_Accepted values: A relative or absolute path to a UTF-8-encoded text file_

The `--from-file` option extracts a list of URLs from the file existing at the relative
or absolute path in the passed value.

Use the `--from-file` option to pass a text file containing multiple URLs (separated
by newlines) to a `vip cache purge-url` command.

In this example command, a list of URLs contained in the multiline contents of a`*.
txt` file named `url-purge-list.txt` is passed to the `vip cache purge-url` to purge:

    ```wp-block-preformatted
    vip @example-app.develop cache purge-url --from-file=/path/to/url-purge-list.txt
    ```

**Prerequisites**

By default, any logged-in WordPress user that has the `edit_others_posts` capability(
e.g. the default roles [Editor](https://wordpress.org/documentation/article/roles-and-capabilities/#editor),
[Administrator](https://wordpress.org/support/article/roles-and-capabilities/#administrator),
and [Super Admin](https://wordpress.org/support/article/roles-and-capabilities/#super-admin))
has access to a button in [the WordPress Admin Toolbar](https://wordpress.org/documentation/article/toolbar/)
that clears the page cache by URL.

The **Purge Page Cache** button is positioned in the WordPress Admin Toolbar on 
the front end of a site when a user is logged in:

[⌊Screenshot of the Purge Page Cache Admin Bar button⌉⌊Screenshot of the Purge Page
Cache Admin Bar button⌉[

An example screenshot of the Purge Page Cache button located in the WordPress Admin
Toolbar.

To purge the cache for the current page—as well as all file assets referenced in
that page (e.g., images, CSS files, JS files)—select the **Purge Page Cache** button.
If the purge action is successful, the text in the button label will update to display
the number of URLs that were purged.

[⌊Screenshot of button after URLs have been purged⌉⌊Screenshot of button after URLs
have been purged⌉[

An example screenshot of the Purge Page Cache button after successfully purging 
a URL and its file assets from the page cache.

**Prerequisites**

By default, any logged-in WordPress user that has the `edit_others_posts` capability(
e.g. the default roles [Editor](https://wordpress.org/documentation/article/roles-and-capabilities/#editor),
[Administrator](https://wordpress.org/support/article/roles-and-capabilities/#administrator),
and [Super Admin](https://wordpress.org/support/article/roles-and-capabilities/#super-admin))
has access to the Purge Cache tool.

The cached response for a single URL can be purged from the page cache with the 
Purge Cache tool that is located within the WordPress Admin dashboard.

In the WordPress Admin dashboard:

 1. Select the navigation menu item labeled “**VIP**“.
 2. Select the sub-navigation menu item labeled “**Purge Cache**“.
 3. Select “Purge a specific URL” from the dropdown menu labeled “**Purge action**“.
 4. In the text field below the selected option, enter the full URL (including scheme)
    to purge from the page cache.
 5. Select the button labeled “**Purge Cache**“.

The response message “Purge queued for URL” indicates that the purge has successfully
completed.

## Purge WordPress responses from origin

The cached responses from a WordPress site’s [origin server](https://docs.wpvip.com/infrastructure/origin-servers/)
can be purged from the page cache with the Purge Cache tool that is located within
the WordPress Admin dashboard. This purging action will not affect other cached 
files such as uploads or deployed static asset files.

**Prerequisites**

By default, any logged-in WordPress user that has the `edit_others_posts` capability(
e.g. the default roles [Editor](https://wordpress.org/documentation/article/roles-and-capabilities/#editor),
[Administrator](https://wordpress.org/support/article/roles-and-capabilities/#administrator),
and [Super Admin](https://wordpress.org/support/article/roles-and-capabilities/#super-admin))
has access to the Purge Cache tool.

In the WordPress Admin dashboard:

 1. Select the navigation menu item labeled “**VIP**“.
 2. Select the sub-navigation menu item labeled “**Purge Cache**“.
 3. Select “Purge WordPress responses from origin” from the dropdown menu labeled “**
    Purge action**“.
 4. Select the button labeled “**Purge Cache**“. A dialog titled “Confirm cache purge”
    will be presented to the user.
 5. Enter the current site URL in the text field to confirm that the cached version
    of WordPress responses from origin can be purged from the page cache.
 6. Select the button labeled “**Confirm purge**“.

The response message “Purge queued for origin responses” indicates that the purge
has successfully completed.

## Purge files uploaded to the VIP File System

The cached version of files that have been uploaded or imported to a WordPress site
and stored on the VIP File System can be purged from the page cache with the Purge
Cache tool that is located within the WordPress Admin dashboard.

**Prerequisites**

By default, any logged-in WordPress user that has the `edit_others_posts` capability(
e.g. the default roles [Editor](https://wordpress.org/documentation/article/roles-and-capabilities/#editor),
[Administrator](https://wordpress.org/support/article/roles-and-capabilities/#administrator),
and [Super Admin](https://wordpress.org/support/article/roles-and-capabilities/#super-admin))
has access to the Purge Cache tool.

In the WordPress Admin dashboard:

 1. Select the navigation menu item labeled “**VIP**“.
 2. Select the sub-navigation menu item labeled “**Purge Cache**“.
 3. Select “Purge files uploaded to the VIP File System for this site” from the dropdown
    menu labeled “**Purge action**“.
 4. Select the button labeled “**Purge Cache**“. A dialog titled “Confirm cache purge”
    will be presented to the user.
 5. Enter the current site URL in the text field to confirm that the cached version
    of all files uploaded or imported to the site can be purged from the page cache.
 6. Select the button labeled “**Confirm purge**“.

The response message “Purge queued for uploaded files” indicates that the purge 
has successfully completed.

## Purge deployed static asset files

The cached version of static asset files that were [deployed to a WordPress environment](https://docs.wpvip.com/code-deployment/)
can be purged from the page cache with the Purge Cache tool that is located within
the WordPress Admin dashboard.

**Prerequisites**

By default, any logged-in WordPress user that has the `edit_others_posts` capability(
e.g. the default roles [Editor](https://wordpress.org/documentation/article/roles-and-capabilities/#editor),
[Administrator](https://wordpress.org/support/article/roles-and-capabilities/#administrator),
and [Super Admin](https://wordpress.org/support/article/roles-and-capabilities/#super-admin))
has access to the Purge Cache tool.

In the WordPress Admin dashboard:

 1. Select the navigation menu item labeled “**VIP**“.
 2. Select the sub-navigation menu item labeled “**Purge Cache**“.
 3. Select “Purge deployed static asset files” from the dropdown menu labeled “**Purge
    action**“.
 4. Select the button labeled “**Purge Cache**“. A dialog titled “Confirm cache purge”
    will be presented to the user.
 5. Enter the current site URL in the text field to confirm that the cached version
    of all deployed static asset files can be purged from the page cache.
 6. Select the button labeled “**Confirm purge**“.

The response message “Purge queued for static asset files” indicates that the purge
has successfully completed.

## Purge files that are protected by Access-Controlled Files

Access can be restricted for files that have been uploaded or imported to a WordPress
site and stored on the VIP File System by [activating the Access-Controlled Files feature](https://docs.wpvip.com/security-controls/access-controlled-files/).
Cached responses for file URLs might already exist on the edge cache prior to the
activation of the Access-Controlled Files feature and mode enablement. Cached content
for file URLs must be purged from the edge cache in order for those requests to 
receive the expected `404` response.

The cached version of protected files can be purged from the page cache with the
Purge Cache tool that is located within the WordPress Admin dashboard.

**Prerequisites**

By default, any logged-in WordPress user that has the `edit_others_posts` capability(
e.g. the default roles [Editor](https://wordpress.org/documentation/article/roles-and-capabilities/#editor),
[Administrator](https://wordpress.org/support/article/roles-and-capabilities/#administrator),
and [Super Admin](https://wordpress.org/support/article/roles-and-capabilities/#super-admin))
has access to the Purge Cache tool.

In the WordPress Admin dashboard:

 1. Select the navigation menu item labeled “**VIP**“.
 2. Select the sub-navigation menu item labeled “**Purge Cache**“.
 3. Select “Purge files that are protected by Access-Controlled Files” from the dropdown
    menu labeled “**Purge action**“.
 4. Select the button labeled “**Purge Cache**“. A dialog titled “Confirm cache purge”
    will be presented to the user.
 5. Enter the current site URL in the text field to confirm that the cached version
    of all deployed static asset files can be purged from the page cache.
 6. Select the button labeled “**Confirm purge**“.

The response message “Purge queued for Access-Controlled Files” indicates that the
purge has successfully completed.

## Purge the cache for the entire site

All URLs and assets related to a site can be purged from the page cache with the
Purge Cache tool that is located within the WordPress Admin dashboard.

**Caution**

The default settings of the page cache are designed to improve a site’s performance
and to protect the stability of a site during high traffic events. Purging the page
cache for an entire site can cause the site to experience temporary instability 
and performance issues.

**Prerequisites**

By default, any logged-in WordPress user that has the `edit_others_posts` capability(
e.g. the default roles [Editor](https://wordpress.org/documentation/article/roles-and-capabilities/#editor),
[Administrator](https://wordpress.org/support/article/roles-and-capabilities/#administrator),
and [Super Admin](https://wordpress.org/support/article/roles-and-capabilities/#super-admin))
has access to the Purge Cache tool.

In the WordPress Admin dashboard:

 1. Select the navigation menu item labeled “**VIP**“.
 2. Select the sub-navigation menu item labeled “**Purge Cache**“.
 3. Select “Purge WordPress responses from origin” from the dropdown menu labeled “**
    Purge action**“.
 4. Select the button labeled “**Purge Cache**“. A dialog titled “Confirm cache purge”
    will be presented to the user.
 5. Enter the current site URL in the text field to confirm that the action to purge
    all URLs and assets related to the site from the page cache should proceed.
 6. Select the button labeled “**Confirm purge**“.

The response message “Purge queued for entire site” indicates that the purge has
successfully completed.

## Manage access to WordPress Admin purge tools

Access to the purge tools that are built into the WordPress Admin dashboard and 
the WordPress Admin Toolbar can be managed programmatically with the `vip_cache_manager_can_purge_cache`
hook.

By default the filter checks if the current user has the `edit_others_posts` capability.
The hook expects boolean `true` to be returned if the current user is allowed to
access the button. 
Custom code can filter `vip_cache_manager_can_purge_cache` to
further restrict access. This code example demonstrates how to restrict access to
the purge tools to the WordPress Administrator role via the `manage_options` capability:

    ```lang-php
    // Allow only admins to acces edge cache controls
    add_filter( 'vip_cache_manager_can_purge_cache', function() { 
        return current_user_can( 'manage_options' );
    } );
    ```

Last updated: June 11, 2026