Site5 - Built For Designers & Developers MENU
Home  ›  Apache  ›  cPanel: How To Disable Nginx Caching

cPanel: How To Disable Nginx Caching

Comments Off on cPanel: How To Disable Nginx Caching

With the addition of Nginx caching on our new server configurations, we find that some users do not want to have caching enabled on their site during development. Due to this, we’ve provided the ability to disable caching while you are developing your site. This can be done simply through your File Manager by following the steps below.

Note: While caching can be disabled, we highly recommend having this enabled when you are done developing your site to help increase performance and reduce overall load on the servers.
  • Log into backstage
  • Mouseover the Services menu and click My Services
    001
  • Locate the hosting plan you want to access under Product/Services and click on the hosting plan
    002
  • Click Login to cPanel under the Actions Menu
    LoginTocPanel
  • Navigate to the Files section and click on File Manager
    FileManager
  • Click the Settings icon located on the upper right hand corner of the page
    Settings
  • Select Show Hidden Files (dotfiles) and click Save
    Preferences
  • Navigate to the folder for your website
    Note: for this example we will assume that your website is under public_html
  • Right-click the file named .htaccess and select Code Edit
    001
  • Click Edit in the Code Editor dialog box
    CodeEditor
  • Add the following code in the text field provided:
    <FilesMatch "\.(html|htm|js|css|php)>
    FileETag None
    Header unset ETag
    Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
    Header set Pragma "no-cache"
    Header set Expires "Fri, 13 Feb 1976 06:00:00 GMT"
    </FilesMatch>
  • Click Save Changes
    save

Caching for your website is now disabled.  You will need to add the code above for every folder that needs caching disabled.  To re-enable caching, you can delete the code or add a pound sign(#) in front of every line.

Still have a question? Or need help?
See an error in this article or want to suggest a missing topic? Please leave us a comment below! If you need technical support with your account, please email us, chat live with a representative, or call us!

Comments are closed.

Money Back Guarantees
Click to verify BBB accreditation and to see a BBB report.