Getting Started

Deployment Deployment - Diagnose Migrations Staging

Site Management

Backups Client Reporting Passwords Plugin Automation Plugin Management - Global Plugins & Themes - Diagnose Plugins & Themes - General Plugins & Themes - Git Plugins & Themes - Logs Must Install SMTP White Label WordPress Updates

Caching & Performance

Caching Caching - Blogs/Articles Caching - Diagnose Caching - Git Caching - WooCommerce Redis Optimize & Scale

Security

Security Security - Firewall

CDN & DNS

CDN CDN - AWS CDN - Cloudflare CDN - Diagnose Domains & DNS

Server & Tools

CRON Jobs Database Debug Tool PHP Settings Redirects SEO Tools Server Errors sFTP SSL Monitoring Analytics & Logs

Staq Billing

Staq Billing > Account Staq Billing > Client Staq Billing > Setup

Media

Media Media - Diagnose Media - Optimize

Accounts & Billing

Accounts & Billing

General

WordPress Hosting Website Diagnose Troubleshoot - Other

CLI commands for Staq cache


On this page

    Scenario

    This knowledge base articles applies in the even that you wish to clear the cache for an individual page on a periodic period without dumping the site’s cache.

    In this example, you’re using Staq cache.

    CLI Commands

    Below are a list of CLI commands:

    • wp wpstaq clear-cache –post_id=[post_ID]
    • wp wpstaq clear-pagebuilder-cache
    • wp wpstaq cloudfront-invalidate-paths <object_paths>
    • wp wpstaq disable-cache
    • wp wpstaq enable-cache
    • wp wpstaq generate-site-critical-css
    • wp wpstaq preload-cache
    • wp wpstaq refresh-internal-cache
    • wp wpstaq s3-offload
    • wp wpstaq s3-offload-patch-resized
    • wp wpstaq verify-iam-keys

    To suit the scenario above, use command, wp wpstaq clear-cache --post_id=xxxx (you can copy this and follow the steps below but replace xxxx with the PostID number)

    Retrieve the page ID

    Inside WordPress, visit the edit page that you wish to clear the cache for that particular page and in the URL bar, retrieve the ID number:

    The command above can be executed either via a WP CLI or Cron Manager.

    WP CLI

    Inside Staq Panel for that website, click WP CLI:

    Then, run the command:

    Running the CRON JOB

    If you wish to automate the process so that you don’t have to do manually, it’s very simple to do.

    In Staq Panel, click Cron Manager:

    Click Add and then select the Job Interval i.e. 1 hour. Then, under the command:

    Need some help?

    We all do sometimes. Please reach out to our support team by dropping us a support ticket. We will respond fast.