WordPress 中文文档

WordPress Optimization/Caching

From WordPress Chinese

Jump to: navigation, search

This article is part of a series on WordPress Optimization

WordPress caching is the fastest way to improve performance. If your site is getting hit right now install WP-Cache2.

目录

Caching Plugins

Plugins like 'WP-Cache can be easily installed and will cache your WordPress posts and pages to static files. These static files are then served to users, removing the processing load on the server. This can improve performance seve hundred times over for fairly static pages.

If your posts/pages have a lot of dynamic content configuring caching can be more complex. Search for WordPress cache plugin for more info.

Plugin/theme combinations like LightPress can also improve your site's performance.

Browser Caching

Browser caching can help to reduce server load by reducing the number of requests per page. For example, by setting the correct cache headers on files that don't change (image, css, etc) browsers should cache these files completely, without generating subsequent http requests. This can avoid a significant number of 304 responses. Look into http Cache-Control headers, specifically max-age for more info.

Server Caching

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. Simplest solutions start with the server caching locally while more complex and involved systems use multiple caching servers in front of web servers and so on. For more on this type of server setup check out http://highscalability.com/ among others.

Further Reading

The following terms were referenced

用户