.How do I clear cache and warm up cache in Shopware 6 correctly?
Quick Answer
You should clear cache in Shopware 6 after theme changes, plugin updates, deployments, or configuration changes. The safest approach is to use the Shopware CLI commands instead of deleting cache folders manually. After clearing cache, always warm it up again so your first real visitors do not experience slow page loads or broken compiled assets.
Before You Start
- ✦ SSH access — you will need terminal access to run cache commands properly.
- ✦ Correct project directory — all commands must run from the Shopware root folder where bin/console exists.
- ✦ Production-safe deployment process — clearing cache incorrectly during peak traffic can cause temporary slowdowns.
Open the project directory
Connect to your server through SSH and move into the Shopware installation root. This is the directory containing folders like custom, vendor, public, and the bin/console file. Running cache commands from the wrong directory is one of the most common deployment mistakes because the commands either fail silently or affect another installation on the same server.
- Connect to the production or staging server
- Navigate into the Shopware root folder
- Verify that bin/console exists before continuing
Clear the Shopware cache
Use the built-in Shopware cache clear command instead of manually deleting cache folders. The CLI command safely removes generated cache files, Symfony cache data, and compiled storefront assets while respecting the current environment configuration. This is the standard approach used in most CI/CD deployment pipelines.
- Run the cache clear command from the project root
- Wait until the command fully completes
- Check terminal output for plugin or permission errors
php bin/console cache:clearWarm up the cache
After clearing the cache, generate fresh cache files before customers hit the storefront. Cache warm-up rebuilds Symfony cache containers and prepares compiled data so the first visitor does not trigger expensive regeneration tasks. On larger stores, skipping this step can temporarily increase CPU usage and slow down category or checkout pages.
- Run the warm-up command immediately after cache clear
- Wait for all cache generation tasks to finish
- Monitor server load during large deployments
php bin/console cache:warmupRebuild storefront assets
If you changed themes, storefront plugins, SCSS, or JavaScript files, rebuild storefront assets after clearing cache. Cache clearing alone does not always regenerate frontend assets correctly. This catches a lot of teams during theme deployments because the backend works while the storefront still serves outdated compiled files.
- Compile storefront assets after theme changes
- Verify CSS and JavaScript load correctly
- Test the homepage and checkout in production mode
php bin/console theme:compileShopware Cache Checklist
0 of 6 completeMistakes Most Developers Make
! Clearing cache during peak traffic
What happens: Customers experience slower page loads while cache rebuilds.
Fix: Run cache maintenance during low-traffic deployment windows.
! Skipping cache warm-up
What happens: First visitors trigger expensive cache generation tasks.
Fix: Always run cache:warmup directly after cache:clear.
! Forgetting theme compilation
What happens: Storefront CSS or JavaScript loads incorrectly after deployment.
Fix: Rebuild storefront assets after any theme or frontend plugin change.
Key Takeaway
The short version: use Shopware CLI commands instead of deleting cache folders manually. Clear the cache, warm it up immediately, and rebuild storefront assets if frontend files changed. Most production issues after deployments come from skipping warm-up or theme compilation. Test the storefront after every cache operation, especially checkout and account pages. Start with Step 2—that one alone handles most of it.
Related Answers
Still need help?
Talk to our Shopware experts
We've handled GDPR/CCPA compliance for dozens of EU & US Shopware stores.