Title: Peakhour
Author: Daniel
Published: <strong>2019 年 4 月 23 日</strong>
Last modified: 2023 年 9 月 19 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/peakhour/assets/icon-256x256.png?rev=2072868)

# Peakhour

 作者：[Daniel](https://profiles.wordpress.org/ddalessa/)

[下载](https://downloads.wordpress.org/plugin/peakhour.zip)

 * [详情](https://cn.wordpress.org/plugins/peakhour/#description)
 * [评价](https://cn.wordpress.org/plugins/peakhour/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/peakhour/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/peakhour/#developers)

 [支持](https://wordpress.org/support/plugin/peakhour/)

## 描述

This plugin will automatically flush Peakhour’s global CDN when editing posts,pages,
media through the wordpress admin.
 It also enables manual flushing based on URL
patterns from within the wordpress admin.

## 屏幕截图

 * [[
 * Peakhour administration Tab

## 安装

#### From within wordpress

 1. Log in to your wordpress admin
 2. Click on Plugins in the left menu
 3. Click on the ‘Add New’ button at the top of the page
 4. Search for ‘Peakhour’, we should be the first result!
 5. Click on ‘Install Now’
 6. Activate from your installed plugin page
 7. Click on Peakhour.io in the left menu

#### Then in a new tab/browser window

 1. Log in to your Peakhour account at peakhour.io
 2. Click on ‘API Keys’ in the left menu
 3. Enter the name of your domain in the API key name and click ‘Create’
 4. Copy the generated API key and paste it into the ‘Peakhour API key’
 5. Go back to your wordpress window and paste the API key into the ‘Peakhour API key’
    field
 6. enter your domain name (do not enter www or http:// etc)
 7. Click on ‘Save Changes’ at the bottom of the page
 8. Click on the ‘Test connection’ button that will now appear in the ‘Connection Settings’
    section

#### Back in the Peakhour admin, configure cache settings

 1. Click on ‘Domains’ in the left menu
 2. Now click on the ‘Manage’ button on the right of your domain
 3. In the left navigation find CDN -> Settings and click
 4. Under the Skip CDN on cookie setting enter ‘wordpress_logged_in*’, this will cause
    the cache to be skipped for logged in users.
 5. Tick the ‘Ignore requests that invalidate’
 6. Towards the bottom of the page find the ‘Tag Header Name’ setting and enter ‘X-
    Cache-Tags’
 7. Next look at the ‘Tag Separator’ setting and select ‘comma’
 8. Save the settings.

#### Configure Caching rules

If wordpress is not sending cache control headers, this plugin won’t, then caching
rules need to be set up. The following are for a standard
 wordpress information
site. If you have additional functionality, eg woocommerce, then additional configuration
will be required.

 1. Continuing on from the configure cache settings section and find EDGE -> Rules 
    in the left menu
 2. As a safeguard add in three no caching rules.
     2.1 Enter ‘php’ as the rule name,‘
    ends_with(http.request.uri.path, “.php”)’ as the filter, add the setting ‘CDN Status’
    and select disabled. Save 2.2 Enter ‘wp-admin’ as the rule name, ‘http.request.
    uri.path eq “/wp-admin/”‘ as the filter, add the setting ‘CDN Status’ and select
    disabled. Save
 3. Add in the general caching rule. Enter ‘general page caching’ as the rule name,‘
    ends_with(http.request.uri.path, “/”)’ as the filter, then add:
     CDN Status = enabled
    Strip Outgoing Cookies = enabled Strip Cookies from response = enabled Ignore Cache
    Headers = enabled Require Cache-Control for caching = disabled Browser TTL = don’t
    cache CDN TTL = 30 days
 4. Save

You can of course make the CDN TTL longer or shorter as required.

## 常见问题

### Do I need a Peakhour account?

Yes you will need to sign up for the Peakhour service at https://www.peakhour.io/
app/signup/,
 all new domains get a free trial

### Do I need to do anything else?

The service will work out of the box but you will probably want to start caching
full pages by setting up
 page rules, see our https://www.peakhour.io/support/page-
rules/ guide to get started.

## 评价

![](https://secure.gravatar.com/avatar/b43e6df2fcf839e59d598beef9e175f6fc1f5bc6465d26305e3b865f2b91830c?
s=60&d=retro&r=g)

### 󠀁[Plug and play](https://wordpress.org/support/topic/plug-and-play-28/)󠁿

 [retrovertigo](https://profiles.wordpress.org/retrovertigo/) 2023 年 6 月 19 日

Great and simple to use plugin.

![](https://secure.gravatar.com/avatar/5b6a352fa0baf8fcdf61546c583a2a86d31513ef8984ea01d948675403aa0687?
s=60&d=retro&r=g)

### 󠀁[Outstanding Plugin and Support](https://wordpress.org/support/topic/outstanding-plugin-and-support-19/)󠁿

 [Jisan Polara](https://profiles.wordpress.org/jpolara/) 2019 年 4 月 26 日

This plugin works perfectly for me. Also, the customer support is fast and thorough.
Best speed optimisation plugin for a WordPress developer. Thanks again to the Peakhour
team.

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/peakhour/reviews/)

## 贡献者及开发者

「Peakhour」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Daniel ](https://profiles.wordpress.org/ddalessa/)

[帮助将「Peakhour」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/peakhour)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/peakhour/)，查看[SVN仓库](https://plugins.svn.wordpress.org/peakhour/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/peakhour/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/peakhour/)。

## 更新日志

#### 1.0.3

_Added_
 * Option to exclude home page from post purging.

#### 1.0.2

_Fixed_
 * Manuel purge by single url

#### 1.0.0

_Added_
 * Flushing based on cache tags, people upgrading make sure you configure
Cache tags.

#### 0.3.2

 * Support php 5.4

#### 0.3.1

_Added_
 * headers to show the requesting wordpress url and referring page for debugging
flush requests.

#### 0.3

_Added_
 * Option to Strip ‘ver=’ parameters off static resources.

#### 0.2

_Added_
 * Add manual flushing options * Ability to remove homepage from automatic
flushing if your homepage doesn’t display posts etc

#### 0.1

 * Flush post/page/category when editing through wordpress admin.

## 额外信息

 *  版本 **1.0.3**
 *  最后更新：**3 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 4.6.2 或更高版本 **
 *  已测试的最高版本为 **6.6.5**
 *  语言
 * [English (US)](https://wordpress.org/plugins/peakhour/)
 * 标签
 * [caching](https://cn.wordpress.org/plugins/tags/caching/)[cdn](https://cn.wordpress.org/plugins/tags/cdn/)
   [performance](https://cn.wordpress.org/plugins/tags/performance/)[security](https://cn.wordpress.org/plugins/tags/security/)
 *  [高级视图](https://cn.wordpress.org/plugins/peakhour/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/peakhour/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/peakhour/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/peakhour/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/peakhour/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/peakhour/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/peakhour/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/peakhour/reviews/)

## 贡献者

 *   [ Daniel ](https://profiles.wordpress.org/ddalessa/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/peakhour/)