WordPress Optimization/Caching

来自WordPress中文文档
MichaelH讨论2008年1月5日 (六) 02:41的版本 (Move stub to bottom, remove new page created)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索

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

includeonlydiv style=clear:both; background-color:#FAEBD7; border:1px solid #CCCCCC; color:#000000; padding:7px; margin:0.5em auto 0.5em auto; vertical-align:middle;This page is marked as incomplete. You can help Codex by expanding it./div/includeonlynoinclude

Description

This Template is used by Codex:Template Messages.

Usage

pre 检查到模板循环:模板:Message /pre

Result

检查到模板循环:模板:Message

/noinclude