1. Home
  2. cPanel
  3. How to configure efficient caching with Nginx in cPanel

How to configure efficient caching with Nginx in cPanel

Efficient caching is critical to faster page delivery and good website ranking by all search engines. Though many modern CMSs have built in caching (Drupal or WordPress), it is vital to provide a server-level and network-level caching to improve page delivery further.

For WordPress specific configuration, check down the page

Efficient caching with Nginx

RedyHost’s cPanel server provide capability to the following caching method:

  1. Nginx static files cache
  2. Nginx Gzip and Brotli compression
  3. Nginx mod_pagespeed to optimise page and asset files size for desktop and mobile devices
  4. Nginx microcache
  5. Nginx cache of your entire website
  6. SSL termination and HTTP/2

How to configure efficient caching of your website

  1. Login to cPanel from your client area
  2. Navigate to the Nginx control pane at the bottom of cPanel page
  3. Select your domain that you intend to manage
  4. Click the Server Settings button

    server settings for Nginx in cPanel

  5. Enable static files cache and Submit your changes

How to enable Nginx Microcache in cPanel

Just follow the steps 1 and 2 above, then:

  1. Click Application Settings button

    Select application settings button in cPanel Nginx

  2. Ensure Proxy mode is selected
    In this mode Nginx proxies requests to Apache and provides microcache or cache layer

    Nginx proxy mode select in cPanel

  3. Activate microcache or cached mode in Nginx

    Select Nginx proxy cache mode in cPanel

  4. Submit the page. Your cache is now activated.

Efficient WordPress caching with Nginx (with expiration)

This efficient WordPress caching with Nginx aims to provide ability to seamlessly flush expired or updated pages or posts in a WordPress site.

  1. Deactivate any existing caching plugins (login to WordPress admin)
  2. Install and activate the Nginx Helpers plugin via WordPress admin backend.
  3. Make sure that you select PHP in the Step 2 above and click Submit
  4. Select the right PHP version, for example 7.0
  5. Enable PHP as the Nginx backend, with FastCGI cache and WordPress support in cPanel

  6. Select In the Nginx configuraiton page  WordPress+FactCGI(Microcached) template
  7. Submit your changes, they take effect immediately.

To enjoy the flexibility and easy to setup caching for your website, sign up for RedyHost cPanel hosting plan of your choice now.

 

Updated on 7 June, 2017

Was this article helpful?

Related Articles