Regenerate CSS is a WordPress ability from Ultimate Addons for Elementor — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Regenerate CSS

Write

Forces Elementor to regenerate the frontend CSS for a specific post, or clears all Elementor CSS caches globally.

Requires the Ultimate Addons for Elementor (Header Footer & Elementor) plugin on WordPress 6.9+ (the WP Abilities API). No ability registers unless the plugin's 'Enable AI Tools' master switch (uae_mcp_settings.enable_abilities) is turned on in settings. Most abilities require the 'manage_options' capability; a smaller set of read/discovery abilities (template and page listing, the Elementor builder read/list/schema abilities, active-template lookup, display-rule locations, and design tokens) instead require only 'edit_posts' or 'read'. Abilities that act on a specific page, post, or template additionally check the current user's per-object 'edit_post' (or 'delete_post') capability on that item. Separately, every non-readonly (Write or Destructive) ability is gated behind a site-wide 'Allow Modifications' setting at registration time: if it is off, none of those abilities are even registered with the WP Abilities API, regardless of capability checks — this covers all template/page CRUD, widget/extension toggles, display-rule updates, theme/settings changes, and the Elementor builder writes alike, not just the builder ones. Eight of those abilities (the seven Elementor page-builder writes — build, insert-widget, update-widget, remove-element, move-element, add-section, add-column — plus pages-create) additionally re-check this same setting explicitly inside execute() as a redundant safeguard.

What it does

Given post_id, if post_id is 0 the handler triggers a global CSS cache clear via Elementor's files manager — restricted to current_user_can('manage_options') since it's a site-wide, potentially performance-affecting operation, distinct from the broader per-post editor permission. For a non-zero post_id, it validates the post via validate_elementor_post() and regenerates that post's CSS files. It requires Elementor to be active, returning a 500 error otherwise. It is meant to be called after builder-build or any structural change so frontend changes render immediately.

See it in action

You ask your AI assistant

"Regenerate the CSS for post 42 so my layout changes show up on the frontend."

Inputs

Name Type Required Description
post_id integer Yes Any Elementor-enabled post ID; pass 0 to regenerate all Elementor CSS globally.

Returns

Returns success and a message confirming either per-post CSS regeneration or global CSS cache clearing.

Permission

permission_callback requires current_user_can('edit_posts'). For post_id=0 (global regeneration), execute() additionally requires current_user_can('manage_options') (403 otherwise). For a specific post_id, execute() calls validate_elementor_post() (Elementor-post validation plus current_user_can('edit_post', ID)). This handler does not call check_modifications_allowed().

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.