How to Manually Clear Varnish Cache

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 –

  1. Login in terminal then use varnishadm command.
  2. Now use ban req.url ~ .* command for clear cache.
  3. Then restart apache server using sudo systemctl restart apache2 command.

when showing 200 response after running ban req.url ~ .*, it means successfully clear cache.