The following instructions assume you have the latest version of the Proxy Cache Purge (formerly called “Varnish HTTP Purge”) plugin. If your WP-Admin shows that an update is available for this plugin, please update before proceeding or if you are encountering in difficulties with any of the following steps.
DreamPress includes built-in server caching, which speeds up your site significantly. Since caching creates static versions of your site, less resources are needed by the server when a customer visits your site. This allows your site to not only load faster, but also helps manage larger amounts of traffic.
Do I need a caching plugin?
Many WordPress guides, including DreamHost’s, recommend caching plugins such as WP Super Cache on WordPress sites. However, since DreamPress comes with built-in caching, a third-party caching plugin such as WP Super Cache is not necessary and might conflict with the DreamPress cache. Instead, DreamHost recommends using its built-in server cache on your DreamPress site. The Proxy Cache Purge plugin is optimized to provide all the tools you need to automatically manage the DreamPress cache and analyze your site’s ability to cache.
The Proxy Cache Purge plugin comes preinstalled on all new and upgraded DreamPress installations. If you've copied over an existing WordPress site from another host to DreamPress, installing this plugin is highly recommended so that managing your DreamPress cache is automated and does not require your attention under normal circumstances.
Testing your site's cache performance using the Proxy Cache Purge plugin
Due to the thousands of plugins and customizations available for WordPress sites, not all sites automatically work effectively with all caching methods. The Proxy Cache Purge plugin offers an option in your WP-Admin panel for you to check page URLs on your site to make sure they are caching successfully. If a page on your site is not caching, the 'Check Caching' option tells you the items you can check that may resolve this issue.
To access this option:
- Open the WP-Admin page for your DreamPress site (e.g., example.com/wp-admin).
- Hover over 'Proxy Cache' and select the 'Check Caching' option.
- The 'Check Caching Status' page opens where you can check a URL on your site:
- Enter a URL in the 'Check A URL On Your Site' field box, and then click the Check URL button.
This feature auto-scans the URL you selected and reports back any issues it finds as well as any known problematic plugins.
Temporarily bypassing the DreamPress cache
The Proxy Cache Purge plugin includes a 'Development Mode' feature, which allows you to temporarily bypass caching for all visitors. This prevents visitors from seeing any old cached content on your WordPress site. You might find this useful if your site is still under development or if you are making major changes to the design. In addition, if you are having issues with a theme or plugin, your developer may ask you to try disabling the cache for further testing.
When Development Mode is enabled, your site runs slower so please use with caution.
You can enable this feature for 24 hours, after which it automatically disables itself. You can also manually turn off Development Mode before the 24 hours have elapsed when you complete your changes or testing. Disabling Development Mode then allows DreamPress to resume caching and thus improves the page loading time for your visitors.
To disable caching (activate Development Mode):
- Open the WP-Admin dashboard page for your DreamPress site (e.g., example.com/wp-admin).
- Select 'Proxy Cache > Settings' in the left pane of your WP-Admin dashboard:
- The Proxy Cache Purge Settings page opens:
- Scroll down to the Development Mode Settings section and check the Activate Development Mode checkbox.
- Click the Save Settings button.
- The following confirmation message appears on the settings page:
- You can also confirm if the built-in server cache is inactive by viewing the Cache status located in the WP-Admin toolbar at the top:
Development Mode remains active for 24 hours, after which it disables and caching resumes normally. You can also manually disable Development Mode on this same page by returning to the 'Settings' page and unchecking the Development Mode checkbox and then saving it.
When would I need to purge my cache?
When you make changes to your site such as customizing or creating new content, the new changes may not show live yet because the old version of your site is cached. Purging your cache can help to push your changes live so visitors see the most recent version of your site.
Manually purging the cache via the plugin
The Proxy Cache Purge plugin includes a 'Purge Cache' button located in the WP-Admin toolbar at the top:
Clicking 'Purge Cache (All Pages)' purges the entire cache. USE SPARINGLY—the whole point of caching is to cache.
A better alternative is to selectively purge the cache of a specific item that you changed, when the changes aren’t showing up. You can purge a post or page from cache using the plugin’s Purge Cache button when you view the live page.
To purge cache for an individual post or page:
- Make sure you are logged into WP-Admin for your site.
- Load the URL of the page or post you want to purge from cache. You can also click the
- In the WP-Admin toolbar at the top of the page, hover over the Cache button and select Purge Cache (This Page) from the dropdown menu options.
The page reloads and the post or page is purged from cache.
If you need to selectively purge specific files such as CSS you manually changed and uploaded via SFTP/SSH, you'll need to do it via SSH for now.
Manually purging the cache via SSH
The following is an example command of how to purge a single CSS file:
[server]$ wp varnish purge https://example.com/wp-content/themes/mytheme/style.css
If you are making changes to your theme files, or updating various themes, the following is a simple way to clear all theme files from your cache:
[server]$ wp varnish purge https://example.com/wp-content/themes/ --wildcard