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 White Label WordPress Updates

Caching & Performance

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

Security

Security Security - Firewall

SMTP, CDN & DNS

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

Server & Tools

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

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

Clear Cache automatically when using a Git Repository


On this page

    Question

    Can Staq cache automatically clear the site’s cache every time I update the plugin or theme’s repo?

    Solution

    It is now possible to have the Staq Cache clear automatically when you’re using a repo like Bitbucket or Github.

    Below are the steps.

    Step 1

    Go to your custom theme/plugin’s repo.

    Step 2

    Inside that theme or plugin, create file name in the main directory:

    .stq_postdeploy

    Be sure to include the full stop at the start of the file name.

    Step 3

    Paste the following WP CLI command inside the file:

    # Clear cache

    wp wpstaq clear-pagebuilder-cache --reason='Aute-clear after Git-pull' 

     

    Step 4

    You’re done!

    Each time Staq pulls information from your repo, our system will look for ../.stq_postdeploy file and it exists, it will parse it and run the WP CLI command to clear the cache.

    Need some help?

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