If cache is enabled, and in order to see if your page is cached, use the “View Source” function in your web browser to view the page source. To find caching information, scroll down to the bottom, and you should see a line added by the cache:
Go to WP-Optimize -> Cache and enable caching. For most people, that will be enough. If you run an e-commerce, have a custom login page or any page that has dynamic content, you might want to exclude certain urls from the cache. See Advanced caching options in our cache documentation to know more on excluding an URL from the cache.
Yes, caching with WP-Optimize allows you to safely cache your products, with plugins like WooCommerce or Easy Digital Downloads, or any e-commerce that uses DONOTCACHEPAGE to exclude sensitive pages from caching (e.g. my account, cart or checkout pages).
No, if WordPress works properly, WP-Optimize will be able to cache your pages and posts.
No, because both cache plugins would need to use the drop-in plugin advanced-cache.php. If you turn off caching on WP-Optimize, you can use any other caching plugin and still use the other features of WP-Optimize. But we do recommend using our caching solution.
Yes! No special cache configuration is needed. Page caching on the WP site (that done by WP-Optimize) is independent of proxy cacheing (e.g. Cloudflare) – you can use both, or neither, and they will complement each other and not interfere. Just one thing to note – Cloudflare will strip out the special HTML comment at the bottom of the source of a page that is helpful to confirm that page caching is working, so, don’t be confused by that – it’s absence doesn’t indicate the cache is not working.
Yes, you can trigger a cache purge action using WP-Optimize public functions. If you want to clear the whole cache, use the function wpo_cache_flush(). If you want to clear the cache files for a specific page or post, use WPO_Page_Cache::delete_single_post_cache($post_id);. Those cache options are available after WP action plugins_loaded.
Yes, when using WordPress’ commenting system, your users will still be able to post comments. Every time a comment is approved, the cache for that page or post will be cleared, allowing the next visitor to see an up to date list of comments.
Usually, a page is cached when a user visits it. So the first user visiting won’t be served a cached version of the page, and will wait longer than the next users. The cache preloading functionality will go through all your pages and posts, and simulate a visit by a user, allowing WP-Optimize to cache the pages before anyone visits them. Your first visitor will thus be served a cached version of the page, increasing its performance.
Choosing a frequency for the cache preloading schedule will depend on factors such as the frequency at which the website content is updated, the number of pages in the cache, the resources of the server and more.
For example a site with hundreds of pages will require more resources to preload its cache. So choosing a high frequency will mean that the cache will be recreated often, and the resource usage will be higher.
On a website where updates aren’t as frequent, you can even disable the cache preloading schedule, or set a high cache lifespan and set the cache preloading schedule to follow it.
Add /.+ to the cache option “URLs to exclude from cache” on the advanced settings tab.
To prevent a page from being cached, you can add the URL to the field “URLs to exclude from cache” in the cache “Advanced settings” tab. If you are developing a plugin and want to prevent a page from being cached, you can define the “DONOTCACHEPAGE” constant on the pages you need. Any request where “DONOTCACHEPAGE” is defined will not be cached.
Yes the caching feature is free. You will always be able to cache your website for free using WP-Optimize and we are constantly working on improving the existing cache feature. We will add more caching options to the free version and develop more specific caching options in the premium version to enable you to taylor the caching functionality to your needs.
The cached files are stored in the common “wp-content/cache” folder, inside a “wpo-cache” folder. Removing the “cache” folder will delete all of WP-Optimize’s cache, as well as those from other plugins.
Deleting the “cache” folder is generally safe, as those cached files will be regenerated.
Go to WP-Optimize settings > Cache and toggle the “Enable page caching” option to on/off.
No, caching will actually reduce the load on your server, by reducing the amount of PHP and mysql used. You might see a peak in resource usage when using the cache preloader, as this functionality will create the cache files for all your pages in a short amount of time. But once this is done, performance should increase and the load on your server will decrease. Every single major site uses caching to serve cached pages faster by using fewer resources.
The cached page is sent to the user before most of WordPress was loaded. The plugins aren’t loaded yet, making it impossible for them to change the cached content at every request.
So at the moment if you want to keep parts of your page dynamic (e.g. adverts, widgets, shopping cart…) AND keep it cached, you will have to use custom solutions using javascript and AJAX to fetch those dynamic parts from the server.
WP-Optimize will remove the “WP_CACHE” constant from wp-config.php when you disable page caching, or when you deactivate the cache plugin. If you need to remove it manually, you can use FTP to edit wp-config.php and delete the line define (‘WP_CACHE’, true );
If page caching is still enabled in the settings, WP-Optimize will attempt to add the line again, as it is required for the caching functionality to work.
WP-Optimize caching feature needs write access to the ‘wp-content/cache’ folder, as this is where the cache files will be stored. It also needs to define the constant ‘WP_CACHE’ in ‘wp-config.php’, it will need access once to ‘wp-content/advanced-cache.php’, as well as to the folder ‘wp-content/wpo-cache’ to write the cache settings.
If you need to change file permissions to enable caching, you can follow the instructions on this page https://wordpress.org/support/article/changing-file-permissions/
There is no limit to the number of pages you can cache. The only limit is the space on your server and the maximum number of subdirectories allowed by your server, as caching will write files in subdirectories following the permalink structure.
If you were to reach a caching limit, it probably means that your server is not fit for the size of your website and caching needs.
You can generate a separate cache by selecting ”Generate separate files for mobile devices” in the page cache settings. This cache setting is only necessary if you use a specific theme for mobile devices, or for certain AMP plugins.
Yes, the cache feature works with Nginx. Should you want to enable browser caching or GZIP compression, you will have to do this yourself directly on the server settings.
Yes, the cache feature works with IIS. As with Nginx, if you need to enable browser caching or GZIP compression, you will have to do this yourself on the server.
No. It’s necessary to have pretty permalinks of the type http://xxxxx.com/my-post/ rather than http://xxxxx.com/?p=1234 for cache to work. Pretty permalinks are the WordPress default setting, and there is no good reason to turn them off, so you should not have a problem with this.
Note that cache will work with permalinks including /index.php/. It is only those based upon query parameters (?…) where cache won’t work.
When you publish new content or update/edit existing content, the cache for that post/page will be cleared.
Changing/updating current themes and parent themes (of child themes) will purge the cache.
When turning off the cache feature in WP-Optimize
No, WP dashboard pages are not cached. The cache functionality is only meant to cache frontend pages.
The cache lifespan is the time a cached file will be kept before being regenerated.
One of the main reason for setting a lifespan to your cache is that some plugins and themes use nonces, which are printed in the source code of the page (Read more about nonces here). These nonces cannot be reused and are valid for 12 hours by default (developers can change that value). The cache plugin will store the nonce in the page, and this one will become invalid after that perdiod of time, which can affect certain functionalities of your plugins and themes. Setting a cache lifespan to under 10 hours ensures the cache is flushed automatically before the nonce expires. This way you can use WP-Optimize’s cache feature on sites which use nonces.
An other reason is that you may want your pages to reflect some changes without having to clear the whole cache. Indeed if you have many pages and posts, you might not want to clear every cache file with every change, but rather set an interval at which they will expire and be regenerated.
A lower cache lifespan value will result in more frequent cache update activity on your server, and thus more preload processes, if activated.
If your site does not use nonces, and your site’s cache doesn’t need to be updated often, you can set the cache lifespan to a high value or to 0 to give it an infinite lifespan.
The cache lifespan option is set to 10 hours by default, but you may go down to 8 or even less.
If you notice any issues due to high server load, set a higher interval for the preloader.