Caching stores frequently accessed data in a "fast" storage layer, dramatically improving website speed. Here are caching options available on BurjHost.
1. Browser Caching (Leverage Browser Cache)
Store static files (CSS, JS, images) on visitors' devices so they don't have to re-download them.
-
For Apache: Add to
.htaccess:<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" </IfModule>
2. Server-Side Caching (Varnish, Redis, Memcached)
-
On Shared Hosting: Check cPanel for caching options like LiteSpeed Cache.
-
On VPS: Install and configure Redis or Memcached for object caching (especially for WordPress/WooCommerce).
3. Application Caching (WordPress Plugins)
-
WP Rocket: Premium plugin with page caching, cache preloading, and more.
-
W3 Total Cache: Free plugin supporting multiple caching types.
-
LiteSpeed Cache: If your server uses LiteSpeed, this plugin is highly optimized.
4. Page Caching with Cloudflare
Cloudflare offers CDN and page caching. Enable it in cPanel or directly on Cloudflare (see Article 38).
5. Opcode Caching (PHP)
PHP opcode caching stores compiled PHP scripts in memory. Ensure OPcache is enabled in your PHP settings (usually enabled by default in modern PHP versions).
Testing Your Cache:
Use tools like GTmetrix or Pingdom to check if your caching headers are correctly set.