Skip to content

Your EMCP guide

Answers from our docs

YOUR CHAT, YOUR CHOICE

Before we chat

MSR Builds processes your question and up to four recent messages on our server to answer from the EMCP docs. AI is optional and needs your separate permission.

The chat is kept in this page's memory, not saved as a conversation in our database or browser storage. Our hosting and security services process connection information, such as your IP address, to prevent abuse.

Cloudflare Turnstile checks your browser and connection to prevent automated abuse when you send a question. No login is required.

Please leave out personal, sensitive or confidential information, passwords and API keys.

You can withdraw consent and clear this page's chat at any time. This cannot undo a request already sent or erase provider/security records.

Chat privacy, retention & your rights ↗ · Privacy contact

Starting chat consents to this processing. You can browse our docs without using the chat.

Clear Cache

New in 3.22.1. After a code, style or content change, a page cache can keep showing visitors the old page until it expires. clear-cache clears every cache layer it finds on the site, so the change shows at once. Content is not changed.

Enabled by default. Requires manage_options. Its switch is in the Performance & Security section of the WordPress tab on EMCP Tools → Tools.

Input (all optional):

  • layers: only these layer ids, such as ["elementor", "wp-rocket"]. Default: every layer found on the site.
  • object_cache: also flush the object cache (Redis, Memcached). Default false.

Returns: results, one entry per layer with layer, label, status and detail; purged, the number of layers cleared or queued; and detected, the layer ids active on the site.

Each layer reports its own status:

StatusMeaning
purgedThe cache plugin’s clear call ran.
queuedThe clear happens on the next request. LiteSpeed clears through a response header; Kinsta accepts a request and clears its server cache.
skippedYou named a layer that is not active on this site.
failedThe clear call returned an error or failed. detail says why.
Layer idPlugin or hostHow it is cleared
elementorElementorRegenerates Elementor’s CSS files.
wp-rocketWP Rocketrocket_clean_domain() and rocket_clean_minify().
litespeedLiteSpeed CacheThe litespeed_purge_all action (queued).
w3-total-cacheW3 Total Cachew3tc_flush_all().
wp-super-cacheWP Super Cachewp_cache_clear_cache().
wp-fastest-cacheWP Fastest Cachewpfc_clear_all_cache().
autoptimizeAutoptimizeautoptimizeCache::clearall().
breezeBreeze (Cloudways)The breeze_clear_all_cache action.
sitegroundSiteGround Speed Optimizersg_cachepress_purge_everything().
wp-optimizeWP-OptimizeIts page cache purge().
cache-enablerCache EnablerThe cache_enabler_clear_complete_cache action.
kinstaKinstaThe purge Kinsta’s own MU plugin runs.

Each plugin’s method was checked against that plugin’s code and run on a test site. Kinsta publishes no PHP API for clearing caches, so EMCP calls the purge Kinsta’s MU plugin uses for its admin bar button; it has not been verified on a live Kinsta site yet. If a layer reports failed, use the plugin’s or host’s own Clear cache button.

add-code-snippet, update-code-snippet, add-custom-css and add-custom-js take clear_cache: true. They then clear the caches after saving and add the same report under cache in their answer.