Clearing the Nginx cache on cPanel can help ensure that users see the latest version of your website. Follow these steps to clear the Nginx cache:
Option 1: Using cPanel's Cache Manager (if available)
-
Log in to cPanel:
- Log in to your cPanel account using your username and password.
-
Navigate to Cache Manager:
- Look for a "Cache Manager" or "Nginx Cache" option in your cPanel. This might be located in the "Advanced" or "Server" sections.
-
Clear Cache:
- Inside the Cache Manager, there should be an option to clear or purge the cache. Click on it to initiate the cache clearing process.
-
Confirm Action:
- Confirm the action if prompted.
Option 2: Manually Clear Nginx Cache via File Manager
-
Access File Manager in cPanel:
- In cPanel, go to "File Manager."
-
Navigate to the Nginx Cache Directory:
- Locate the directory where Nginx stores its cache. This is typically in the
/var/cache/nginx/
directory, but it may vary based on your server configuration.
- Locate the directory where Nginx stores its cache. This is typically in the
-
Delete Cache Files:
- Select all files within the cache directory and delete them.
Additional Tips:
-
Check Nginx Configuration:
- Ensure that your Nginx configuration is set up to use caching. This might involve checking the
nginx.conf
or virtual host configuration files.
- Ensure that your Nginx configuration is set up to use caching. This might involve checking the
-
Cache Expiry Settings:
- If you're having issues with the cache not clearing, review your Nginx cache expiry settings to make sure they align with your website's update frequency.
Note: Clearing the Nginx cache may temporarily impact website performance as the cache needs to be rebuilt. Ensure to do this during periods of low traffic or when updates to the website are essential.
By following these steps, you can clear the Nginx cache on your cPanel server, ensuring that users see the most recent version of your website. If you encounter any difficulties or have a customized setup, it's recommended to consult with your server administrator or hosting provider for assistance.