If you have do any type of changes on your WordPress site and want to clear varnish cache. So use simple command on your apache server‘s terminal.
How to Do
use two command on your server and clear cache now –
- Login in terminal then use varnishadm command.
- Now use ban req.url ~ .* command for clear cache.
- Then restart apache server using sudo systemctl restart apache2 command.
when showing 200 response after running ban req.url ~ .*, it means successfully clear cache.