How to clear Nginx cache
After updating my WordPress site I had to clear the cache. I’m using Nginx’s Microcache and I really believed that I could flush it be restarting Nginx. However, that didn’t do the trick as I still kept seeing the old WordPress content. What you have to do is to clear the contents of the Nginx cache folder. This can be done by following these steps.
- Find you cache path. It might be set in the variable fastcgi_cache_path. If not, the default seems to be /var/cache/nginx/
- Remove the cache folder by executing the following command rm -rf /var/cache/nginx/
- Restart Nginx to reenable caching