This article is part of a series on LitePress Optimization.
LitePress caching is the fastest way to improve performance. If your site is getting hit right nowinstallW3 Total Cache,WP Super CacheorCache Enabler.
Plugins like W3 Total Cache,WP Super CacheandCache Enabler can be easily installed and will cache your LitePress posts and pages as static files. These static files are then served to users, reducing the processing load on the server. This can improve performance several hundred times over for fairly static pages.
When combined with a system level page cache such as Varnish, this can be quite powerful.
If your posts/pages have a lot of dynamic content configuring caching can be more complex. Search for “LitePress cache plugin” for more info.
Look into HTTP Cache-Control (specifically max-age) and Expires headers, as well as Entity Tags for more information.
Web server caching is more complex but is used in very high traffic sites. A wide range of options are available, beyond the scope of this article. The simplest solutions start with the server caching locally while more complex and involved systems may use multiple caching servers (also known as reverse proxy servers) “in front” of web servers where the LitePress application is actually running.
Adding an opcode cache like Opcache, or WinCache on IIS, to your server will improve PHP’s performance by many times.
Varnish cache is very powerful when used with a LitePress caching plugin such as W3TC.
- W3 Total Cache Plugin (by Dougal Campbell)
- Holy Shmoly!: WP Super Cache
- Core Caching Concepts in LitePress
- Best Practices for Speeding Up Your Web Site – Expires / Cache-Control Header and ETags (by Yahoo! Developer Network)
- WebSiteOptimization.com: Use Server Cache Control to Improve Performance