Manage Nginx – Enable, Disable and Clear Nginx Cache

Nginx is now enabled by default for all packages as a reverse proxy cache. Normally, the benefits of caching are visible through an increase in the general speed and availability of your sites via caching. This works by saving a copy of site content, then returning this copy to the user directly. Removing the need to request and generate the content from the origin server every time a user visits a site. This is a much more efficient way of handling requests, especially on busy sites.

However, on occasion, caching will need to be disabled or cleared.

One such occasion is during the active development of a site. You might need changes to appear immediately, because of how caching works it might be best to disable the cache entirely for the duration of development.

This guide outlines how to do this from your cPanel control panel, so you must first log in to cPanel.

  • First off, from the main cPanel overview screen, navigate to the general information panel.
Nginx panel in cPanel
Nginx panel in cPanel

Enable Nginx Cache in cPanel

  • To enable the cache, click the highlighted radio button and a small spinning icon will appear.
Enable Nginx in cPanel
  • Caching is active when the button appears blue and “Active” appears.
Nginx showing active

Disable Nginx Cache in cPanel

  • To disable caching, click the highlighted button below, the loading icon indicates it is working.
Disable nginx
  • Caching is disabled when the button appears clear and the text “Inactive” appears. It will also remove the “Clear Cache” button.

Clear Nginx Cache in cPanel

  • Clearing the cache is simple, just click the “Clear Cache” button as indicated below. If the cache clean-up is successful, a green banner will appear above.
Clear Nginx Cache