
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Sat, 04 Apr 2026 06:31:19 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Speeding up your (WordPress) website is a few clicks away]]></title>
            <link>https://blog.cloudflare.com/speeding-up-your-website-in-a-few-clicks/</link>
            <pubDate>Thu, 22 Jun 2023 13:00:58 GMT</pubDate>
            <description><![CDATA[ In this blog, we will explain where the opportunities exist to improve website performance, how to check if a specific site can improve performance, and provide a small JavaScript snippet which can be used with Cloudflare Workers to do this optimization for you ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/h8hH7qWrYChGMYyrktaXj/163bb1bb8d730c069de5865285db1697/image1-31.png" />
            
            </figure><p>Every day, website visitors spend far too much time waiting for websites to load in their browsers. This waiting is partially due to browsers not knowing which resources are critically important so they can prioritize them ahead of less-critical resources. In this blog we will outline how millions of websites across the Internet can improve their performance by specifying which critical content loads first with Cloudflare Workers and what Cloudflare will do to make this easier by default in the future.</p><p>Popular Content Management Systems (CMS) like WordPress have made attempts to influence website resource priority, for example through techniques like <a href="https://make.wordpress.org/core/2020/07/14/lazy-loading-images-in-5-5/">lazy loading images</a>. When done correctly, the results are magical. Performance is optimized between the CMS and browser without needing to implement any changes or coding new prioritization strategies. However, we’ve seen that these default priorities have opportunities to improve greatly.</p><p>In this co-authored blog with Google’s Patrick Meenan we will explain where the opportunities exist to improve website performance, how to check if a specific site can improve performance, and provide a small JavaScript snippet which can be used with Cloudflare Workers to do this optimization for you.</p>
    <div>
      <h3>What happens when a browser receives the response?</h3>
      <a href="#what-happens-when-a-browser-receives-the-response">
        
      </a>
    </div>
    <p>Before we dive into where the opportunities are to <a href="https://www.cloudflare.com/learning/performance/speed-up-a-website/">improve website performance</a>, let’s take a step back to understand how browsers load website assets by default.</p><p>After the browser sends a <a href="https://www.cloudflare.com/learning/ddos/glossary/hypertext-transfer-protocol-http/">HTTP request</a> to a server, it receives a HTTP response containing information like status codes, headers, and the requested content. The browser carefully analyzes the response's status code and response headers to ensure proper handling of the content.</p><p>Next, the browser processes the content itself. For HTML responses, the browser extracts important information from the  section of the HTML, such as the page title, stylesheets, and scripts. Once this information is parsed, the browser moves on to the response  which has the actual page content. During this stage, the browser begins to present the webpage to the visitor.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/QXSvFomT1av14RMVga2Qf/e379b539ca63b484d47e9f14f128cada/image2-28.png" />
            
            </figure><p>If the response includes additional 3rd party resources like CSS, JavaScript, or other content, the browser may need to fetch and integrate them into the webpage. Typically, browsers like Google Chrome delay loading images until after the resources in the HTML  have loaded. This is also known as “<a href="https://developer.chrome.com/en/docs/lighthouse/performance/render-blocking-resources/">blocking</a>” the render of the webpage. However, developers can override this blocking behavior using <a href="https://web.dev/fetch-priority/">fetch priority</a> or other methods to boost other content’s priority in the browser. By adjusting an important image's fetch priority, it can be loaded earlier, which can lead to significant improvements in crucial performance metrics like LCP (<a href="https://web.dev/optimize-lcp/#:~:text=LCP%20measures%20the%20time%20from%20when%20the%20user%20initiates%20loading%20the%20page%20until%20the%20largest%20image">Largest Contentful Paint</a>).</p><p>Images are so central to web pages that they have become an essential element in measuring website performance from <a href="https://www.cloudflare.com/learning/performance/what-are-core-web-vitals/">Core Web Vitals</a>. LCP measures the time it takes for the largest visible element, often an image, to be fully rendered on the screen. Optimizing the loading of critical images (like <a href="https://web.dev/optimize-lcp/#:~:text=LCP%20measures%20the%20time%20from%20when%20the%20user%20initiates%20loading%20the%20page%20until%20the%20largest%20image">LCP images</a>) can greatly enhance performance, improving the overall user experience and page performance.</p><p>But here's the challenge – a browser may not know which images are the most important for the visitor experience (like the LCP image) until rendering begins. If the developer can identify the LCP image or critical elements before it reaches the browser, its priority can be increased at the server to boost website performance instead of waiting for the browser to naturally discover the critical images.</p><p>In our Smart Hints <a href="/smart-hints">blog</a>, we describe how Cloudflare will soon be able to automatically prioritize content on behalf of website developers, but what happens if there’s a need to optimize the priority of the images right now? How do you know if a website is in a suboptimal state and what can you do to improve?</p><p>Using Cloudflare, developers should be able to improve image performance with heuristics that identify likely-important images before the browser parses them so these images can have increased priority and be loaded sooner.</p>
    <div>
      <h3>Identifying Image Priority opportunities</h3>
      <a href="#identifying-image-priority-opportunities">
        
      </a>
    </div>
    <p>Just increasing the fetch priority of all images won't help if they are lazy-loaded or not critical/LCP images. <a href="https://www.cloudflare.com/learning/performance/what-is-lazy-loading/">Lazy-loading</a> is a method that developers use to generally improve the initial load of a webpage if it includes numerous out-of-view elements. For example, on Instagram, when you continually scroll down the application to see more images, it would only make sense to load those images when the user arrives at them otherwise the performance of the page load would be needlessly delayed by the browser eagerly loading these out-of-view images. Instead the highest priority should be given to the LCP image in the viewport to improve performance.</p><p>So developers are left in a situation where they need to know which images are on users' screens/viewports to increase their priority and which are off their screens to lazy-load them.</p><p>Recently, we’ve seen attempts to influence image priority on behalf of developers. For example, by <a href="https://make.wordpress.org/core/2020/07/14/lazy-loading-images-in-5-5/">default</a>, in WordPress 5.5 all images with an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img">IMG tag</a> and <a href="https://en.wikipedia.org/wiki/Aspect_ratio_(image)">aspect ratios</a> were directed to be lazy-loaded. While there are plugins and other methods WordPress developers can use to boost the priority of LCP images, lazy-loading all images in a default manner and not knowing which are LCP images can cause artificial performance delays in website performance (they’re <a href="https://make.wordpress.org/core/2023/05/02/proposal-for-enhancing-lcp-image-performance-with-fetchpriority/">working on this</a> though, and have partially resolved this for <a href="https://make.wordpress.org/core/2023/04/05/wordpress-6-2-performance-improvements-for-all-themes/">block themes</a>).</p><p><i>So how do we identify the LCP image and other critical assets before they get to the browser?</i></p><p>To evaluate the opportunity to improve image performance, we turned to the <a href="https://httparchive.org/">HTTP Archive</a>. Out of the approximately 22 million desktop pages tested in February 2023, 46% had an <a href="https://web.dev/optimize-lcp/">LCP element</a> with an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img">IMG tag</a>. Meaning that for page load metrics, LCP had an image included about half the time. Though, among these desktop pages, 8.5 million had the image in the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML">static HTML</a> delivered with the page, indicating a <b>total potential improvement opportunity of approximately 39% of the desktop pages</b> within the dataset.</p><p>In the case of mobile pages, out of the ~28.5 million tested, 40% had an LCP element as an IMG tag. Among these mobile pages, 10.3 million had the image in the static HTML delivered with the page, suggesting a potential <b>improvement opportunity in around 36% of the mobile pages</b> within the dataset.</p><p>However, as previously discussed, prioritizing an image won't be effective if the image is lazy-loaded because the directives are contradictory. In the dataset,  approximately 1.8 million LCP desktop images and 2.4 million LCP mobile images were lazy-loaded.</p><p>Therefore, across the Internet, the opportunity to improve image performance would be about ~30% of pages that have an LCP image in the original HTML markup that weren’t lazy-loaded, but with a more advanced Cloudflare Worker, the additional 9% of lazy-loaded LCP images can also be improved improved by removing the lazy-load attribute.</p><p>If you’d like to determine which element on your website serves as the <a href="https://web.dev/lcp/#what-elements-are-considered">LCP element</a> so you can increase the priority or remove any lazy-loading, you can use browser <a href="https://developer.chrome.com/docs/devtools/">developer tools</a>, or <a href="https://www.cloudflare.com/learning/performance/test-the-speed-of-a-website/">speed tests</a> like <a href="https://www.webpagetest.org/">Webpagetest</a> or <a href="https://dash.cloudflare.com?to=/:account/:zone/speed/test">Cloudflare Observatory</a>.</p><p>39% of desktop images seems like a lot of opportunity to improve image performance. So the next question is how can Cloudflare determine the LCP image across our network and automatically prioritize them?</p>
    <div>
      <h3>Image Index</h3>
      <a href="#image-index">
        
      </a>
    </div>
    <p>We thought that how soon the LCP image showed up in the HTML would serve as a useful indicator. So we analyzed the HTTP Archive dataset to see where the cumulative percentage of LCP images are discovered based on their position in the HTML, including lazy-loaded images.</p><p>We found that approximately 25% of the pages had the LCP image as the first image in the HTML (around 10% of all pages). Another 25% had the LCP image as the second image. WordPress seemed to arrive at a similar conclusion and recently <a href="https://make.wordpress.org/core/2023/04/05/wordpress-6-2-performance-improvements-for-all-themes/">released</a> a development to remove the default lazy-load attribute from the first image on block themes, but there are opportunities to go further.</p><p>Our analysis revealed that implementing a straightforward rule like "do not lazy-load the first four images," either through the browser, a content management system (CMS), or a Cloudflare Worker could address approximately 75% of the issue of lazy-loading LCP images (example Worker below).</p>
    <div>
      <h3>Ignoring small images</h3>
      <a href="#ignoring-small-images">
        
      </a>
    </div>
    <p>In trying to find other ways to identify likely LCP images we next turned to the size of the image. To increase the likelihood of getting the LCP image early in the HTML, we looked into ignoring “small” images as they are unlikely to be big enough to be a LCP element. We explored several sizes and 10,000 pixels (less than 100x100) was a pretty reliable threshold that didn’t skip many LCP images and avoided a good chunk of the non-LCP images.</p><p>By ignoring small images (&lt;10,000px), we found that the first image became the LCP image in approximately 30-34% of cases. Adding the second image increased this percentage to 56-60% of pages.</p><p>Therefore, to improve image priority, a potential approach could involve assigning a higher priority to the first four "not-small" images.</p>
    <div>
      <h3>Chrome 114 Image Prioritization Experiment</h3>
      <a href="#chrome-114-image-prioritization-experiment">
        
      </a>
    </div>
    <p>An experiment running in Chrome 114 does exactly what we described above. Within the browser there are a few different prioritization knobs to play with that aren’t web-exposed so we have the opportunity to assign a “medium” priority to images that we want to boost automatically (directly controlling priority with “fetch priority” lets you set high or low). This will let us move the images ahead of other images, async scripts and parser-blocking scripts late in the body but still keep the boosted image priority below any high-priority requests, particularly dynamically-injected blocking scripts.</p><p>We are experimenting with boosting the priority of varying numbers of images (2, 5 and 10) and with allowing one of those medium-priority images to load at a time during Chromes “tight” mode (when it is loading the render-blocking resources in the head) to increase the likelihood that the LCP image will be available when the first paint is done.</p><p>The data is still coming in and no “ship” decisions have been made yet but the early results are very promising, improving the LCP time across the entire web for all arms of the experiment (not by massive amounts but moving the metrics of the whole web is notoriously difficult).</p>
    <div>
      <h3>How to use Cloudflare Workers to boost performance</h3>
      <a href="#how-to-use-cloudflare-workers-to-boost-performance">
        
      </a>
    </div>
    <p>Now that we’ve seen that there is a large opportunity across the Internet for helping prioritize images for performance and how to identify images on individual pages that are likely LCP images, the question becomes, what would the results be of implementing a network-wide rule that could boost image priority from this study?</p><p>We built a test worker and deployed it on some WordPress test sites with our friends at <a href="https://rocket.net/">Rocket.net</a>, a WordPress hosting platform focused on performance. This worker boosts the priority of the first four images while removing the lazy-load attribute, if present. When deployed we saw good performance results and the expected image prioritization.</p>
            <pre><code>export default {
  async fetch(request) {
    const response = await fetch(request);
 
    // Check if the response is HTML
    const contentType = response.headers.get('Content-Type');
    if (!contentType || !contentType.includes('text/html')) {
      return response;
    }
 
    const transformedResponse = transformResponse(response);
 
    // Return the transformed response with streaming enabled
    return transformedResponse;
  },
};
 
async function transformResponse(response) {
  // Create an HTMLRewriter instance and define the image transformation logic
  const rewriter = new HTMLRewriter()
    .on('img', new ImageElementHandler());
 
  const transformedBody = await rewriter.transform(response).text()
 
  const transformresponse = new Response(transformedBody, response)
 
  // Return the transformed response with streaming enabled
  return transformresponse
}
 
class ImageElementHandler {
  constructor() {
    this.imageCount = 0;
    this.processedImages = new Set();
  }
 
  element(element) {
    const imgSrc = element.getAttribute('src');
 
    // Check if the image is small based on Chrome's criteria
    if (imgSrc &amp;&amp; this.imageCount &lt; 4 &amp;&amp; !this.processedImages.has(imgSrc) &amp;&amp; !isImageSmall(element)) {
      element.removeAttribute('loading');
      element.setAttribute('fetchpriority', 'high');
      this.processedImages.add(imgSrc);
      this.imageCount++;
    }
  }
}
 
function isImageSmall(element) {
  // Check if the element has width and height attributes
  const width = element.getAttribute('width');
  const height = element.getAttribute('height');
 
  // If width or height is 0, or width * height &lt; 10000, consider the image as small
  if ((width &amp;&amp; parseInt(width, 10) === 0) || (height &amp;&amp; parseInt(height, 10) === 0)) {
    return true;
  }
 
  if (width &amp;&amp; height) {
    const area = parseInt(width, 10) * parseInt(height, 10);
    if (area &lt; 10000) {
      return true;
    }
  }
 
  return false;
}</code></pre>
            <p>When testing the Worker, we saw that default image priority was boosted into “high” for the first four images and the fifth image remained “low.” This resulted in an LCP range of “<a href="https://web.dev/lcp/#:~:text=first%20started%20loading.-,What%20is%20a%20good%20LCP%20score%3F,across%20mobile%20and%20desktop%20devices.">good</a>” from a speed test. While this initial test is not a dispositive indicator that the Worker will boost performance in every situation, the results are promising and we look forward to continuing to experiment with this idea.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4jHIrp0orKEbGAppkSWVXq/1d0b5704b4ae310010e25a99599dfa49/image3-21.png" />
            
            </figure><p>While we’ve experimented with WordPress sites to illustrate the issues and potential performance benefits, this issue is present across the Internet.</p><p>Website owners can help us experiment with the Worker above to improve the priority of images on their websites or edit it to be more specific by targeting likely LCP elements. Cloudflare will continue experimenting using a very similar process to understand how to safely implement a network-wide rule to ensure that images are correctly prioritized across the Internet and performance is boosted without the need to configure a specific Worker.</p>
    <div>
      <h3>Automatic Platform Optimization</h3>
      <a href="#automatic-platform-optimization">
        
      </a>
    </div>
    <p>Cloudflare’s <a href="https://developers.cloudflare.com/automatic-platform-optimization/">Automatic Platform Optimization</a> (APO) is a plugin for WordPress which allows Cloudflare to deliver your entire WordPress site from our network ensuring consistent, fast performance for visitors. By serving cached sites, APO can improve performance metrics. APO does not currently have a way to prioritize images over other assets to improve browser render metrics or dynamically rewrite HTML, techniques we’ve discussed in this post. Although this presents a potential opportunity for future development, it requires thorough testing to ensure safe and reliable support.</p><p>In the future we’ll look to include the techniques discussed today as part of APO, however in the meantime we recommend using <a href="/snippets-announcement/">Snippets</a> (and <a href="/performance-experiments-with-cloudflare/">Experiments</a>) to test with the code example above to see the performance impact on your website.</p>
    <div>
      <h3>Get in touch!</h3>
      <a href="#get-in-touch">
        
      </a>
    </div>
    <p>If you are interested in using the JavaScript above, we recommended testing with <a href="https://workers.cloudflare.com/">Workers</a> or using <a href="/snippets-announcement/">Cloudflare Snippets</a>. We’d love to hear from you on what your results were. Get in touch via social media and share your experiences.</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Automatic Platform Optimization]]></category>
            <category><![CDATA[WordPress]]></category>
            <guid isPermaLink="false">5VIbkWZzUAIMJDqTVlKR8i</guid>
            <dc:creator>Alex Krivit</dc:creator>
            <dc:creator>Patrick Meenan (Guest Author)</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare and WordPress.com partner to Help Build a Better Internet]]></title>
            <link>https://blog.cloudflare.com/cloudflare-and-wordpress/</link>
            <pubDate>Fri, 19 Mar 2021 14:00:00 GMT</pubDate>
            <description><![CDATA[ Today we’re excited to announce a number of initiatives, starting with the integration of Cloudflare’s privacy-first web analytics into WordPress.com. This integration gives WordPress.com publishers choice in how they collect usage data and derive insights about their visitors.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Cloudflare’s mission is to help build a better Internet. We’ve been at it since 2009 and we’re making progress <b>—</b> with approximately 25 million Internet properties being secured and accelerated by our platform.</p><p>When we look at other companies that not only have the scale to impact the Internet, but who are also on a similar mission, it’s hard to ignore Automattic, maintainers of the ubiquitous open-source WordPress software and owner of one the web’s largest WordPress hosting platforms <a href="https://wordpress.com/">WordPress.com</a>, where up to 409 million people read 20 billion pages every month.<sup>1</sup></p>
    <div>
      <h3>Privacy First Web Analytics</h3>
      <a href="#privacy-first-web-analytics">
        
      </a>
    </div>
    <p>When we started brainstorming ways to combine our impact, one shared value stood out: <b>privacy.</b> We both share a vision for a more private Internet. Today we’re excited to announce a number of initiatives, starting with the integration of Cloudflare’s <a href="/privacy-first-web-analytics/">privacy-first web analytics</a> into WordPress.com. This integration gives WordPress.com publishers choice in how they collect usage data and derive insights about their visitors.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3znwHzgEAogcdosqu3OvsU/8aac055d85416de6c12ca5035519364b/image1.gif" />
            
            </figure><p>Figure 1) Cloudflare Web Analytics tracking code integrated in the WordPress.com dashboard</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/sFNS01o7G7oakIR1VyiAa/cfc48917cba8538e0470d1533c3c020f/image4-16.png" />
            
            </figure><p>Figure 2) An example of Cloudflare Web Analytics in the Cloudflare dashboard.</p>
    <div>
      <h3>Automatic Platform Optimization for WordPress</h3>
      <a href="#automatic-platform-optimization-for-wordpress">
        
      </a>
    </div>
    <p>This is not the first time we’ve launched a WordPress-focused product. In October, we introduced <a href="/automatic-platform-optimizations-starting-with-wordpress/">Automatic Platform Optimization</a> for WordPress sites, a service that our testing has shown to improve the TTFB by up to 72%!  This feature has been incredibly popular with our shared customer base and so we continued to look for ways to bring our two platforms closer together.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/59vbljUmjd5sylbUAx6Irz/c4a72a9a95adc13efdc758725ce1d8e8/Automatic-Platform-Optimization-blog-body.png" />
            
            </figure>
    <div>
      <h3>How to Get Started</h3>
      <a href="#how-to-get-started">
        
      </a>
    </div>
    <p>Starting today, Cloudflare Web Analytics settings will appear under the Marketing area of the WordPress.com dashboard, meaning users can simply paste in the analytics code snippet and WordPress.com will take care of injecting the code into their site at runtime. Users will also see links throughout the dashboard to <a href="/automatic-platform-optimizations-starting-with-wordpress/">Cloudflare APO</a> and Cloudflare’s <a href="https://support.cloudflare.com/hc/en-us/articles/200172516-Understanding-Cloudflare-s-CDN">CDN</a>, which they can enable within the Cloudflare dashboard.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4kI44qH8kuypdEMno82yn/c95bdbbae976916fbfe14a7c83920d0e/image3.gif" />
            
            </figure><p>Figure 3) Additional links to Cloudflare performance and security features in the WordPress.com dashboard</p>
    <div>
      <h3>Better Together</h3>
      <a href="#better-together">
        
      </a>
    </div>
    <p>WordPress.com + Cloudflare has always been a best-of-breed collaboration, combining security and performance on one hand, with the world’s leading content management and publishing platform on the other. Integrating privacy-first web analytics with native support in the WordPress.com platform is just the latest step towards a better Internet.</p><p>To learn more and get started, visit our <a href="https://www.cloudflare.com/pg-lp/cloudflare-for-wordpress-dot-com">landing page</a>.</p><hr /><p><sup>1</sup><a href="https://wordpress.com/activity/">https://wordpress.com/activity/</a></p> ]]></content:encoded>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[Analytics]]></category>
            <guid isPermaLink="false">5a4x8q0z1lgTWECTrui2Jt</guid>
            <dc:creator>Steven Pack</dc:creator>
            <dc:creator>Simon Steiner</dc:creator>
            <dc:creator>Philip Johnson</dc:creator>
        </item>
        <item>
            <title><![CDATA[Automatic Platform Optimization post-launch report]]></title>
            <link>https://blog.cloudflare.com/apo-post-launch-report/</link>
            <pubDate>Tue, 16 Mar 2021 12:00:00 GMT</pubDate>
            <description><![CDATA[ We explored almost 200 websites with the activated Automatic Platform Optimization feature in Chrome User Experience Report data. Automatic Platform Optimization consistently demonstrated better aggregate performance among sites we analyzed in TTFB, First Paint, FCP, and LCP metrics. ]]></description>
            <content:encoded><![CDATA[ <p>Last year during <a href="/automatic-platform-optimizations-starting-with-wordpress/">Birthday Week</a>, we announced Automatic Platform Optimization for WordPress (APO): smart HTML caching for WordPress sites using Cloudflare. Initial testing across various WordPress sites demonstrated significant improvements in performance metrics like Time to First Byte (TTFB), First Contentful Paint (FCP), and Speed Index. We wanted to measure how APO impacted web performance for our customers since the launch.</p><p>In the blog post, we answer the following questions:</p><ul><li><p>How fast is Automatic Platform Optimization? Can you demonstrate it with data?</p></li></ul><p>We will show real-world improvements for several performance metrics.</p><ul><li><p>Is Automatic Platform Optimization flexible enough to integrate smoothly with my WordPress site?</p></li></ul><p>We have added and improved lots of features since the initial launch.</p><ul><li><p>Will Automatic Platform Optimization work when used with other plugins?</p></li></ul><p>We will cover the most common use cases and explain how Automatic Platform Optimization could be fined-tuned.</p>
    <div>
      <h2>Measuring performance with WebPageTest</h2>
      <a href="#measuring-performance-with-webpagetest">
        
      </a>
    </div>
    <p>We use WebPageTest as a go-to tool for <a href="/new-speed-page/">synthetic testing at Cloudflare</a>. It measures web performance metrics in real browsers, is highly programmable, and could scale to test millions of sites per day. Among the benefits of synthetic testing are easy to produce results and their relatively high reproducibility.</p><p>Automatic Platform Optimization internal testing with WebPageTest demonstrated a very promising 72% reduction in Time to First Byte (TTFB) and 23% reduction to <a href="https://web.dev/fcp/">First Contentful Paint</a>. Follow <a href="/automatic-platform-optimizations-starting-with-wordpress/#the-benefits-of-automatic-platform-optimization">the original blog post</a> to learn more about our test setup and results analysis.</p>
    <div>
      <h2>Measuring performance with the Chrome User Experience Report</h2>
      <a href="#measuring-performance-with-the-chrome-user-experience-report">
        
      </a>
    </div>
    <p>In comparison to synthetic testing, Real User Monitoring (RUM) is invaluable in painting the picture of how a website performs in real-world conditions: on different form factors and variable connection types. Although noise to signal ratio could be high in RUM data, there is no substitute for measuring web performance in the wild.</p><p>We analyzed Google's <a href="https://developers.google.com/web/tools/chrome-user-experience-report">Chrome User Experience Report</a> of Automatic Platform Optimization websites and compared results from two months before enabling CrUX to the two months after. We present results of Time To First Byte, First Paint, First Contentful Paint, and Largest Contentful Paint.</p>
    <div>
      <h3>Time To First Byte by device</h3>
      <a href="#time-to-first-byte-by-device">
        
      </a>
    </div>
    <p>Time To First Byte (TTFB) is the time taken from the user or client making an HTTP request until the first byte arrives back to the browser.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7ukvHUfnTwdV6G9O2tInJK/da54e8a03550745d5c304c3664cacdb0/image1-15.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/nDmdI6LfhEhCmwrw8YAdE/6f4d30993e12970e71a0ad6efb0499b6/image6-5.png" />
            
            </figure><p>Automatic Platform Optimization improvements in the TTFB metric demonstrated the largest increase in the 'good' bucket and the largest decrease in the 'poor' bucket both on desktop and phone form factors among all metrics. The improvement in the 'poor' bucket on mobile demonstrates how Automatic Platform Optimization makes a difference even on slow connection types like 3G, 2G, slow 2G. Faster response times with Automatic Platform Optimization from edge servers translate directly into quicker TTFB timings, positively affecting all other performance measurements.</p>
    <div>
      <h3>First Paint by device</h3>
      <a href="#first-paint-by-device">
        
      </a>
    </div>
    <p>First Paint measures the first time the browser rendered any content. First Paint signifies the earliest point when something happens on the screen after a user requests a page. It is a good proxy for a user believing the website is not broken.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5crFujbvMLpxg5SWITmSm5/c8159070f9395e2b2a22b44bd860efad/image3-12.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6aaGYS8TwMdLUbyI75g7jA/69edacd19a63b2f3bbc013e056537fb8/image7-4.png" />
            
            </figure><p>Almost a 10% increase in the 'good' bucket on a desktop is the highlight for the First Paint metric. It's nice to see a clear trend of improvement in both desktop and phone data. It's also worth mentioning that the exact values used to define 'good’, 'moderate’, and the 'poor' buckets are picked arbitrarily for each timing metric. This trend means it's more important to look at the percentage of improvement rather than absolute values for each 'bucket'.</p>
    <div>
      <h3>First Contentful Paint by device</h3>
      <a href="#first-contentful-paint-by-device">
        
      </a>
    </div>
    <p>First Contentful Paint (FCP) metric measures how long a page takes to start rendering any text, image, non-white canvas, or SVG content. FCP is a good indicator of perceived speed as it portrays how long people wait to see the first signs of a site loading.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4DmAXL8e0YkFDplrWevrkS/f4f720ab35931d8b6afd5f7ff034f54d/image8-4.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6SPbEFcNeYbmiKYAkGnLZk/1b9f60e6c36257cb45ff879498aaa0ee/image5-12.png" />
            
            </figure><p>It is the third straight metric that has been improved in both form factors after customers activated Automatic Platform Optimization. FCP happens even later than the First Paint event. We can draw a hypothesis that Automatic Platform Optimization positively impacts the loading performance metrics of the site. Still, the later the event happens, the less impact Automatic Platform Optimization has on that particular metric.</p>
    <div>
      <h3>Largest Contentful Paint by device</h3>
      <a href="#largest-contentful-paint-by-device">
        
      </a>
    </div>
    <p>The Largest Contentful Paint (LCP) metric reports the render time for the largest image or text block visible within the viewport.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5VPFYu1C2Z4QJGbIUVuOTn/c41163eabc93b087c93a6da4a2f2a329/image4-11.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1UvAakum79HmgCxkdj9Hw3/4223477af4ccc5ca6dbf702ce2d3da5d/image2-10.png" />
            
            </figure><p>Our hypothesis holds ground with LCP as well. Interestingly enough, the positive impact of Automatic Platform Optimization activation is relatively equal on desktops and phones.</p>
    <div>
      <h3>Summary</h3>
      <a href="#summary">
        
      </a>
    </div>
    <p>Overall, Automatic Platform Optimization consistently demonstrated better aggregate performance among sites we analyzed in TTFB, First Paint, FCP, and LCP metrics. Even more impressive are improvements on both desktop and phone form factors. It’s worth pointing out that apart from noticeable differences in hardware characteristics, phone data capture all mobile connection types from slow 2G to fast 4G.</p><p>We explored almost 200 websites with the activated Automatic Platform Optimization feature in Chrome User Experience Report data. To smooth the variance, we combined two months of data before and after Automatic Platform Optimization activation. To further decrease inaccuracy, we dropped a month’s worth of data that included the activation period. As an example, for a website that activated Automatic Platform Optimization last October, we used Chrome User Experience Report measurements from August and September as the <code>before</code> bucket. The <code>after</code> bucket combined data from November and December.</p><p>It is important to note that due to the limitations of iOS, Chrome User Experience Report mobile results don't include devices running Apple's mobile operating system.</p><p>Chrome User Experience Report data provides performance metrics per geographic location, form factor, or connection type. We analyzed aggregated data across all countries and connection types to focus on the overall performance.</p>
    <div>
      <h2>Extended Automatic Platform Optimization Functionality</h2>
      <a href="#extended-automatic-platform-optimization-functionality">
        
      </a>
    </div>
    <p>Since the product launch, we have been listening carefully to the customers' reports of Automatic Platform Optimization’s missing functionality or unexpected behavior. The number of different use cases our customers have underlines how broad the WordPress ecosystem is. One of the advantages of Automatic Platform Optimization utilizing the Workers platform is that we can quickly iterate and release in a matter of hours instead of days or weeks. Granted, some features like Cache By Device Type or subdomains support took us longer to build. Still, for apparent bugs or missing functionality, the ability to release on demand made all the difference for the team and our customers.</p><p>We start the second part of the report with a brief description of the features we have released since October. Afterward, we will paint a bigger picture of how Automatic Platform Optimization fits together with a broad WordPress plugins ecosystem.</p>
    <div>
      <h3>Smart caching for marketing query parameters</h3>
      <a href="#smart-caching-for-marketing-query-parameters">
        
      </a>
    </div>
    <p>By default Automatic Platform Optimization doesn’t cache pages with query parameters. One of the first feature requests from the community was to add caching support for marketing attribution (for example, UTMs) query parameters. We did exactly that, and the full list of the supported parameters is in <a href="https://support.cloudflare.com/hc/en-us/articles/360049822312#h_01EN42YA87TDRX47MSB2XC61Q9">the documentation</a>.</p>
    <div>
      <h3>Improved cache hit ratio</h3>
      <a href="#improved-cache-hit-ratio">
        
      </a>
    </div>
    <p>Cloudflare provides <a href="https://support.cloudflare.com/hc/en-us/articles/200172516">static caching</a> out of the box by default. The caching system for static content relies on file extensions to determine the content type. In contrast, HTML pages don't always have file extensions in the URL. That's why Automatic Platform Optimization caching relies on HTTP's <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation">content negotiation mechanism</a> for HTML content.</p><p>We check both the request's Accept and the response's Content-Type headers for the 'text/html' substring. When humans access sites on the Internet, browsers send correct Accept headers behind the scene. When bots access the sites, they don't always send Accept headers. Initially, the Automatic Platform Optimization cache passed all requests without a valid Accept header to the origin servers. When customers tried to migrate from using the "Cache Everything" page rule to only using Automatic Platform Optimization, they noticed extra load on the origin servers.. Now all GET and HEAD requests are checked against the Automatic Platform Optimization cache. The change noticeably improved the cache hit ratio for all Automatic Platform Optimization customers and enhanced page loads for good bots.</p>
    <div>
      <h3>Improved security</h3>
      <a href="#improved-security">
        
      </a>
    </div>
    <p><a href="https://portswigger.net/research/practical-web-cache-poisoning">Cache poisoning</a> is a common attack vector against any caching system. One of the benefits of Automatic Platform Optimization is that most of the logic runs on edge servers, and we can update it without any changes on the origin server. To mitigate potential cache poisoning, we released a new version to bypass caching if any of the following request headers are present:</p><ul><li><p>X-Host</p></li><li><p>X-Forwarded-Host</p></li><li><p>X-Original-URL</p></li><li><p>X-Rewrite-URL</p></li></ul><p>Additionally, any GET request <a href="https://portswigger.net/research/web-cache-entanglement#fatget">with a body</a> will bypass Automatic Platform Optimization caching.</p>
    <div>
      <h3>Page Rules integration</h3>
      <a href="#page-rules-integration">
        
      </a>
    </div>
    <p>Automatic Platform Optimization's primary goal is to improve page load performance while keeping the configuration as simple as possible. On the other hand, the Automatic Platform Optimization service should allow fine-tuning for advanced use cases. One such mechanism is Cloudflare's <a href="https://support.cloudflare.com/hc/en-us/articles/218411427-Understanding-and-Configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-">Page Rules</a>. As of today, Automatic Platform Optimization supports the following rules:</p><ul><li><p>Cache Level: Bypass</p></li><li><p>Cache Level: Ignore Query String</p></li><li><p>Cache Level: Cache Everything</p></li><li><p>Bypass Cache on Cookie (Biz and Ent plans only)</p></li><li><p>Edge Cache TTL</p></li><li><p>Browser Cache TTL</p></li></ul><p>For a detailed description, refer to the <a href="https://support.cloudflare.com/hc/en-us/articles/360049822312-Understanding-Automatic-Platform-Optimization-APO-with-WordPress#h_01ER098Z0DRS95ERCMZRV3022S">official documentation</a>.</p>
    <div>
      <h3>Subdomain Support</h3>
      <a href="#subdomain-support">
        
      </a>
    </div>
    <p>Automatic Platform Optimization aims to provide seamless integration with the WordPress ecosystem. It recognizes specific cookies for the most popular plugins like WooCommerce, JetPack, BigCommerce, Easy Digital Downloads, etc.</p><p>Currently, we limit Automatic Platform Optimization usage to WordPress sites. During the initial launch, we restricted Automatic Platform Optimization to run against root domains only, but we learned later of the high demand to run Automatic Platform Optimization on subdomains. To make it possible, we updated both the plugin and <a href="https://api.cloudflare.com/#zone-settings-change-automatic-platform-optimization-for-wordpress-setting">API</a> to allow Automatic Platform Optimization to run on subdomains. Three steps are required to enable Automatic Platform Optimization on a subdomain:</p><ul><li><p>Install version 3.8.7 or later of the Cloudflare WordPress plugin.</p></li><li><p>Log in using Global key. (You can only use an API token for the root domain.)</p></li><li><p>Enable APO. The subdomain displays in the list of hostnames in the card.</p></li></ul><p>The initial cost of $5 per month for Free plans includes running Automatic Platform Optimization against any number of subdomains.</p>
    <div>
      <h3>Caching by Device Type</h3>
      <a href="#caching-by-device-type">
        
      </a>
    </div>
    <p>The majority of site visits come from users accessing the web on <a href="https://www.perficient.com/insights/research-hub/mobile-vs-desktop-usage-study">mobile devices</a>. And website visitors expect sites to work well on mobile devices. In fact, responsive design is a recommended approach for websites. APO works well for responsive design websites because the cache's content will adjust to the client's screen size seamlessly. The alternative method is to serve different markup on mobile browsers.</p><p>Many popular WordPress plugins add a mobile-friendly theme to the site. For sites with such plugins installed, Automatic Platform Optimization breaks functionality by serving the same cached version for all users. As we learned about the growing number of customers with this problem, we looked for the solution. Cloudflare’s caching already has support for <a href="https://support.cloudflare.com/hc/en-us/articles/229373388-Understand-Cache-by-Device-Type-Enterprise-plans-only-">cache by device type</a> functionality, but it's only available for customers on the Enterprise plan. As was a case for the <a href="https://support.cloudflare.com/hc/en-us/articles/236166048">Bypass Cache on Cookie</a> page rule, we decided to include the functionality as part of the Automatic Platform Optimization offering. As a recap, Caching by Device Type relies on the User-Agent request header for detection. There are three types:</p><ul><li><p>Mobile</p></li><li><p>Tablet</p></li><li><p>Everything else</p></li></ul><p>For each type, the Cloudflare cache will store content in a separate bucket. To enable caching by device type, either navigate to the dashboard's Automatic Platform Optimization card or the Cloudflare WordPress plugin. We recommend using a single cache whenever possible because caching by device type can decrease cache hit ratio and increase the load on origin servers.</p>
    <div>
      <h3>Other noticeable changes</h3>
      <a href="#other-noticeable-changes">
        
      </a>
    </div>
    <p>There are many improvements including:</p><ul><li><p>Improved purging infrastructure of content from KV.</p></li><li><p>Extended automatic cache purging for categories and tags.</p></li><li><p>Addressed many edge cases for Google Fonts optimization.</p></li><li><p>Added support for HEAD requests.</p></li><li><p>Automated release pipeline for the Cloudflare WordPress plugin.</p></li></ul>
    <div>
      <h2>Improved WordPress plugins compatibility</h2>
      <a href="#improved-wordpress-plugins-compatibility">
        
      </a>
    </div>
    <p>There are over 50,000 WordPress plugins currently available for download, and because there are so many, we can't test the compatibility of Automatic Platform Optimization with each one individually. We do know, however, that it's vital to provide compatibility for the most popular plugins. Thanks to the vibrant community, we quickly learned about the most widely used issues with Automatic Platform Optimization caching. The plugins that experienced problems could be grouped into the following categories:</p><ul><li><p>Plugins with custom cookies</p></li><li><p>Plugins with geolocation functionality</p></li><li><p>Plugins with mobile themes</p></li><li><p>Plugins with AMP support</p></li><li><p>Plugins that generate HTML</p></li><li><p>Caching and optimizations plugins</p></li></ul><p>Let's review those categories and available solutions for improved compatibility.</p>
    <div>
      <h3>Plugins with custom cookies</h3>
      <a href="#plugins-with-custom-cookies">
        
      </a>
    </div>
    <p>One of the critical features Automatic Platform Optimization provides out of the box is cookie-based rules to bypass APO caching. For any plugin that uses custom cookies, Automatic Platform Optimization requires extending the rules. We have a list of <a href="https://support.cloudflare.com/hc/en-us/articles/360049822312#h_01EQ44V6KRFM6Z0F06MM0EJGJ5">supported plugins</a> that uses our cookies bypass logic.</p>
    <div>
      <h3>Plugins with geolocation functionality</h3>
      <a href="#plugins-with-geolocation-functionality">
        
      </a>
    </div>
    <p>This broad category of plugins relies on geolocation information based on the client's (visitor) IP address (connecting to Cloudflare) to provide its functionality. Early on, we had a misconfiguration in Automatic Platform Optimization functionality that resulted in sending a dummy IP address in the CF-Connecting-IP request header that was forwarded to the origin server.</p><p>This behavior effectively broke the functionality of the widely used Wordfence Security plugin. We promptly released a fix. Because we use Cloudflare Workers internally, Cloudflare Workers treated Automatic Platform Optimization requests sent to the origin as cross-zone requests due to security concerns. As a result, <a href="https://support.cloudflare.com/hc/en-us/articles/200170986-How-does-Cloudflare-handle-HTTP-Request-headers-">the CF-Connecting-IP</a> header value was replaced with a dummy IP address. The change was to send the Automatic Platform Optimization worker's subrequest to the origin as a same-zone request to pass the real client IP without a security concern. Also, Automatic Platform Optimization now sends the client's IP via the X-Forwarded-For request header to the origin to improve plugin compatibility.</p>
    <div>
      <h3>Plugins with mobile themes</h3>
      <a href="#plugins-with-mobile-themes">
        
      </a>
    </div>
    <p>There are several WordPress plugins that render custom themes for mobile visitors. Those plugins rely on the browser's User-Agent to detect visitors from mobile devices. In December, we released Automatic Platform Optimization support for the "Cache by device type" feature. With a single configuration change, you can activate a separate cache based on the device type: mobile, tablet, and everything else. You can learn more about the feature in the <a href="https://support.cloudflare.com/hc/en-us/articles/360049822312#h_01ERZ6QHBGFVPSC44SJAC1YM6Q">official documentation</a>.</p>
    <div>
      <h3>Plugins with AMP support</h3>
      <a href="#plugins-with-amp-support">
        
      </a>
    </div>
    <p>The AMP (<a href="https://amp.dev/">Accelerated Mobile Pages</a>) project's goal is to make the web, and, in particular, the mobile web, much more pleasant to surf. The AMP HTML framework is designed to help web pages load quickly and avoid distracting the user with irrelevant content.</p><p>The most popular AMP WordPress plugins render AMP-compatible markup when the page URL contains the amp= query parameter. AMP markup is a subset of HTML with several restrictions and we looked into possible solutions to provide Automatic Platform Optimization caching for AMP pages. It requires a separate cache for AMP pages similar to the "Cache by device type" feature. Considering Google's recent push with Core Web Vitals, the AMP format's importance will decrease going forward. Based on the complexity of supporting dedicated AMP caching and Google's deprioritization of the AMP format, we decided to bypass Automatic Platform Optimization caching of AMP pages.</p><p>There are two possible approaches for caching AMP pages. The first one is to change the URL schema for AMP pages from, for example, site.com/page/?amp= to site.com/amp/page/. With this option, Automatic Platform Optimization caches AMP pages out of the box. Another solution is to activate the "Cache Everything" Page rule for AMP pages served with amp= query parameter. Note that AMP pages will require manual cache purging in both cases on content change.</p>
    <div>
      <h3>Plugins that generate HTML</h3>
      <a href="#plugins-that-generate-html">
        
      </a>
    </div>
    <p>Using Automatic Platform Optimization with Page Rules makes it possible to:</p><ul><li><p>Bypass caching pages that contain CAPTCHAs.</p></li><li><p>Set Edge TTL for pages that contain nonces or server-rendered ads to six hours or shorter.</p></li></ul>
    <div>
      <h3>Caching and optimizations plugins</h3>
      <a href="#caching-and-optimizations-plugins">
        
      </a>
    </div>
    <p>Among the most popular caching and optimizations WordPress plugins are LiteSpeed Cache, W3 Total Cache, WP Rocket, WP Fastest Cache, WP Super Cache, Autoptimize. To successfully activate Advanced Platform Optimization when any of the plugins above already present, follow these steps:</p><ul><li><p><a href="https://support.cloudflare.com/hc/en-us/articles/360049822312#h_01EKKWPM2KC6H9CD0ATX98KG1C">Install</a> and activate the Cloudflare WordPress plugin.</p></li><li><p>Enable Automatic Platform Optimization in the plugin.</p></li><li><p>Clear any server cache used via other plugins.</p></li><li><p>Verify that your origin starts serving the response header "cf-edge-cache: cache,platform=wordpress".</p></li></ul><p>That should make caching plugins and Automatic Platform Optimization compatible.</p><p>In using optimizations features inside the plugins, additional steps are necessary to integrate with Automatic Platform Optimization. Any of the following plugin's optimizations require subsequent purging of Cloudflare cache:</p><ul><li><p>JavaScript minification and async-loading</p></li><li><p>CSS minification, inlining, and aggregation</p></li><li><p>HTML minification</p></li><li><p>Images optimization and lazy-loading</p></li><li><p>Google fonts optimizations</p></li></ul><p>There are three potential solutions we discuss in the order of preference.</p>
    <div>
      <h4>1. Use Cloudflare products</h4>
      <a href="#1-use-cloudflare-products">
        
      </a>
    </div>
    <p>Most of the optimizations are possible with Cloudflare today:</p><ul><li><p>Auto Minify provides minification for HTML, CSS, and JavaScript</p></li><li><p>Rocket Loader provides JavaScript lazy loading</p></li><li><p>Mirage and Image-resizing allows image optimization and lazy-loading</p></li><li><p>Advanced Platform Optimization optimizes Google fonts out of the box</p></li></ul>
    <div>
      <h4>2. Activate plugins integration with Cloudflare</h4>
      <a href="#2-activate-plugins-integration-with-cloudflare">
        
      </a>
    </div>
    <ul><li><p>WP Rocket <a href="https://docs.wp-rocket.me/article/18-using-wp-rocket-with-cloudflare">integrates</a> with Cloudflare API.</p></li><li><p>WP Fastest Cache <a href="https://www.wpfastestcache.com/tutorial/wp-fastest-cache-cloudflare/">integrates</a> with Cloudflare API.</p></li><li><p>W3 Total Cache <a href="https://kinsta.com/blog/w3-total-cache/#how-to-set-up-w3-total-cache-with-the-cloudflare-extension">integrates</a> with Cloudflare API. Make sure to enable the Page Caching option.</p></li></ul>
    <div>
      <h4>3. Integration with Cloudflare cache purging</h4>
      <a href="#3-integration-with-cloudflare-cache-purging">
        
      </a>
    </div>
    <p>The rest of the plugins in the list, when producing content optimizations, require triggering of Cloudflare cache purging manually or via <a href="https://api.cloudflare.com/#zone-purge-files-by-url">API</a>:</p><ul><li><p>LiteSpeed Cache</p></li><li><p>WP Super Cache</p></li><li><p>Autoptimize</p></li></ul>
    <div>
      <h3>Summary</h3>
      <a href="#summary">
        
      </a>
    </div>
    <p>Automatic Platform Optimization is compatible with the most popular caching plugins. Content optimizations should be preferably migrated to Cloudflare offerings. Alternatively, plugins require triggering Cloudflare cache purging via API integration. The action of the last resort is to disable plugins optimizations but keep caching functionality.</p><p>We work closely with the WordPress plugins community to improve compatibility with Advanced Platform Optimization.</p>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>Automatic Platform Optimization demonstrated improved performance metrics in both synthetic and real-world settings. The public Chrome User Experience Report dataset proved to be an invaluable source of RUM metrics for web performance analysis. Automatic Platform Optimization showed noticeable improvements on desktops and phones. TTFB is the most improved metric, but we also noticed positive changes in the First Paint, First Contentful Paint, and Largest Contentful Paint metrics.</p><p>It has been intensive and rewarding several months since the Automatic Platform Optimization launch, and we greatly increased Automatic Platform Optimization applicability based on customer feedback. Our <a href="https://community.cloudflare.com/">community forum</a> is a great place to get help and ask questions about Cloudflare products, including Advanced Platform Optimization.</p><p>There are more exciting Automatic Platform Optimization improvements the team is actively working on, and we can't wait to share them. Stay tuned!</p> ]]></content:encoded>
            <category><![CDATA[Automatic Platform Optimization]]></category>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Cache]]></category>
            <category><![CDATA[Performance]]></category>
            <guid isPermaLink="false">3f2zJqUMBglhwX15U1lOPm</guid>
            <dc:creator>Yevgen Safronov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Building Automatic Platform Optimization for WordPress using Cloudflare Workers]]></title>
            <link>https://blog.cloudflare.com/building-automatic-platform-optimization-for-wordpress-using-cloudflare-workers/</link>
            <pubDate>Fri, 02 Oct 2020 13:00:00 GMT</pubDate>
            <description><![CDATA[ zero-config edge caching and optimizations for improved performance for WordPress. Reduce WordPress plugin burden. ]]></description>
            <content:encoded><![CDATA[ <p>This post explains how we implemented the <a href="/automatic-platform-optimizations-starting-with-wordpress/">Automatic Platform Optimization</a> for WordPress. In doing so, we have defined a new place to run WordPress plugins, at the edge written with Cloudflare Workers. We provide the feature as a Cloudflare service but what’s exciting is that anyone could build this using the Workers platform.</p><p>The service is an evolution of the ideas explained in an earlier <a href="/improving-html-time-to-first-byte/">zero-config edge caching of HTML</a> blog post. The post will explain how Automatic Platform Optimization combines the best qualities of the regular Cloudflare cache with Workers KV to improve cache cold starts globally.</p><p>The optimization will work both with and without the <a href="https://support.cloudflare.com/hc/en-us/articles/227634427-Using-Cloudflare-with-WordPress">Cloudflare for WordPress plugin</a> integration. Not only have we provided a zero config edge HTML caching solution but by using the Workers platform we were also able to improve the performance of <a href="/fast-google-fonts-with-cloudflare-workers/">Google font loading</a> for all pages.</p><p>We are launching the feature first for WordPress specifically but the concept can be applied to any website and/or content management system (CMS).</p>
    <div>
      <h3>A new place to run WordPress plugins?</h3>
      <a href="#a-new-place-to-run-wordpress-plugins">
        
      </a>
    </div>
    <p>There are many individual WordPress plugins for performance that use similar optimizations to existing Cloudflare services. Automatic Platform Optimization is bringing them all together into one easy to use solution, deployed at the edge.</p><p>Traditionally you have to maintain server plugins with your WordPress installation. This comes with maintenance costs and can require a deep understanding of how to fine tune performance and security for each and every plugin. Providing the optimizations on the client side can also lead to performance problems due to the <a href="https://v8.dev/blog/cost-of-javascript-2019">costs of JavaScript</a> execution. In contrast most of the optimizations could be built-in in Cloudflare’s edge rather than running on the server or the client. Automatic Platform Optimization will be always up to date with the latest performance and <a href="https://www.cloudflare.com/learning/security/how-to-improve-wordpress-security/">security best practices</a>.</p>
    <div>
      <h3>How to optimize for WordPress</h3>
      <a href="#how-to-optimize-for-wordpress">
        
      </a>
    </div>
    <p>By default Cloudflare CDN caches assets based on <a href="https://support.cloudflare.com/hc/en-us/articles/200172516#h_a01982d4-d5b6-4744-bb9b-a71da62c160a">file extension</a> and doesn’t cache HTML content. It is possible to configure HTML caching with a <a href="https://support.cloudflare.com/hc/en-us/articles/202775670#3SVKvGhbS9BNT34zRCsPJ7">Cache Everything Page</a> rule but it is a manual process and often requires additional features only available on the Business and Enterprise plans. So for the majority of the WordPress websites even with a <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDN</a> in front them, HTML content is not cached. Requests for a HTML document have to go all the way to the origin.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/14SelFUXAc9SBPwqea8OUD/92f9e753055a0759bc0f87ef7c021bca/image3-2.png" />
            
            </figure><p>Even if a CDN optimizes the connection between the closest edge and the website’s origin, the origin could be located far away and also be <a href="https://www.cloudflare.com/learning/cdn/common-cdn-issues/">slow to respond</a>, especially under load.</p>
    <div>
      <h3>Move content closer to the user</h3>
      <a href="#move-content-closer-to-the-user">
        
      </a>
    </div>
    <p>One of the primary recommendations for speeding up websites is to move content closer to the end-user. This reduces the amount of time it takes for packets to travel between the end-user and the web server - the <a href="https://www.cloudflare.com/learning/cdn/glossary/round-trip-time-rtt/">round-trip time (RTT)</a>. This improves the speed of establishing a connection as well as serving content from a closer location.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/VJdt6X0xF6xuDyMI0CHXu/4e17456b4b864eb1b5eabc08713a4438/image6-1.png" />
            
            </figure><p>We have previously blogged about the <a href="/improving-html-time-to-first-byte/">benefits of edge caching HTML</a>. Caching and serving from HTML from the Cloudflare edge will greatly improve the time to first byte (TTFB) by optimizing DNS, connection setup, SSL negotiation, and removing the origin server response time.If your origin is slow in generating HTML and/or your user is far from the origin server then all your performance metrics will be affected.</p><p>Most HTML isn’t really dynamic. It needs to be able to change relatively quickly when the site is updated but for a huge portion of the web, the content is static for months or years at a time. There are special cases like when a user is logged-in (as the admin or otherwise) where the content needs to differ but the vast majority of visits are of anonymous users.</p>
    <div>
      <h3>Zero config edge caching revisited</h3>
      <a href="#zero-config-edge-caching-revisited">
        
      </a>
    </div>
    <p>The goal is to make updating content to the edge happen automatically. The edge will cache and serve the previous version content until there is new content available. This is usually achieved by triggering a cache purge to remove existing content. In fact using a combination of our <a href="https://www.cloudflare.com/integrations/wordpress/">WordPress plugin</a> and <a href="https://api.cloudflare.com/#zone-purge-files-by-url">Cloudflare cache purge API</a>, we already support <a href="https://support.cloudflare.com/hc/en-us/articles/115002708027-Cloudflare-WordPress-Plugin-Automatic-Cache-Management-">Automatic Cache Purge on Website Updates</a>. This feature has been in use for many years.</p><p>Building automatic HTML edge caching is more nuanced than caching traditional static content like images, styles or scripts. It requires defining rules on what to cache and when to update the content. To help with that task we introduced a custom header to communicate caching rules between Cloudflare edge and origin servers.</p><p>The Cloudflare Worker runs from every edge data center, the serverless platform will take care of scaling to our needs. Based on the request type it will return HTML content from Cloudflare Cache using <a href="https://developers.cloudflare.com/workers/runtime-apis/cache">Worker’s Cache API</a> or serve a response directly from the origin. Specifically designed custom header provides information from the origin on how the script should handle the response. For example worker script will never cache responses for authenticated users.</p>
    <div>
      <h3>HTML Caching rules</h3>
      <a href="#html-caching-rules">
        
      </a>
    </div>
    <p>With or without Cloudflare for WordPress plugin, HTML edge caching requires all of the following conditions to be met:</p><ul><li><p>Origin responds with 200 status</p></li><li><p>Origin responds with "text/html" content type</p></li><li><p>Request method is GET.</p></li><li><p>Request path doesn’t contain query strings</p></li><li><p>Request doesn’t contain any WordPress specific cookies: "wp-*", "wordpress*", "comment_*", "woocommerce_*" unless it’s "wordpress_eli" or "wordpress_test_cookie".</p></li><li><p>Request doesn’t contain any of the following headers:</p><ul><li><p>"Cache-Control: no-cache"</p></li><li><p>"Cache-Control: private"</p></li><li><p>"Pragma:no-cache"</p></li><li><p>"Vary: *"</p></li></ul></li></ul><p>Note that the caching is bypassed if the devtools are open and the “Disable cache” option is active.</p>
    <div>
      <h3>Edge caching with plugin</h3>
      <a href="#edge-caching-with-plugin">
        
      </a>
    </div>
    <p>The preferred solution requires a <a href="https://support.cloudflare.com/hc/en-us/articles/227634427-Using-Cloudflare-with-WordPress">configured Cloudflare for WordPress plugin</a>. We provide the following features set when the plugin is activated:</p><ul><li><p>HTML edge caching with 30 days TTL</p></li><li><p>30 seconds or faster cache invalidation</p></li><li><p>Bypass HTML caching for logged in users</p></li><li><p>Bypass HTML caching based on presence of WordPress specific cookies</p></li><li><p>Decrease load on origin servers. If a request is fetched from Cloudflare CDN Cache we skip the request to the origin server.</p></li></ul>
    <div>
      <h3>How is this implemented?</h3>
      <a href="#how-is-this-implemented">
        
      </a>
    </div>
    <p>When an eyeball requests a page from a website and Cloudflare doesn’t have a copy of the content it will be fetched from the origin. As the response is sent from the origin and goes through Cloudflare’s edge, Cloudflare for WordPress plugin adds a custom header: <code>cf-edge-cache</code>. It allows an origin to configure caching rules applied on responses.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6COdQPrdIxdu1UiJgsdyVd/015cf3f6aa598f70cfe089d74292a1b9/image4-1.png" />
            
            </figure><p>Based on the <a href="/improving-html-time-to-first-byte/">X-HTML-Edge-Cache</a> proposal the plugin adds a cf-edge-cache header to every origin response. There are 2 possible values:</p><ul><li><p>cf-edge-cache: no-cache</p></li></ul><p>The page contains private information that shouldn’t be cached by the edge. For example, an active session exists on the server.</p><ul><li><p>cf-edge-cache: cache, platform=wordpress</p></li></ul><p>This combination of cache and platform will ensure that the HTML page is cached. In addition, we ran a number of checks against the presence of WordPress specific cookies to make sure we either bypass or allow caching on the Edge.</p><p>If the header isn’t present we assume that the Cloudflare for WordPress plugin is not installed or up-to-date. In this case the feature operates without a plugin support.</p>
    <div>
      <h3>Edge caching without plugin</h3>
      <a href="#edge-caching-without-plugin">
        
      </a>
    </div>
    <p>Using the Automatic Platform Optimization feature in combination with Cloudflare for WordPress plugin is our recommended solution. It provides the best feature set together with almost instant cache invalidation. Still, we wanted to provide performance improvements without the need for any installation on the origin server.</p><p>We provide the following features set when the plugin is not activated:</p><ul><li><p>HTML edge caching with 30 days TTL</p></li><li><p>Cache invalidation may take up to 30 minutes. A manual cache purge could be triggered to speed up cache invalidation</p></li><li><p>Bypass HTML caching based on presence of WordPress specific cookies</p></li><li><p>No decreased load on origin servers. If a request is fetched from Cloudflare CDN Cache we still require an origin response to apply cache invalidation logic.</p></li></ul><p>Without Cloudflare for WordPress plugin we still cache HTML on the edge and serve the content from the cache when possible. The logic of cache revalidation happens after serving the response to the eyeball. <a href="https://developers.cloudflare.com/workers/learning/fetch-event-lifecycle#waituntil">Worker’s waitUntil() callback</a> allows the user to run code without affecting the response to the eyeball and is run in background.</p><p>We rely on the following headers to detect whether the content is stale and requires cache update:</p><ul><li><p>ETag. If the cached version and origin response both include ETag and they are different we replace cached version with origin response. The behavior is the same for strong and weak ETag values.</p></li><li><p>Last-Modified. If the cached version and origin response both include Last-Modified and origin has a later Last-Modified date we replace cached version with origin response.</p></li><li><p>Date. If no ETag or Last-Modified header is available we compare cached version and origin response Date values. If there was more than a 30 minutes difference we replace cached version with origin response.</p></li></ul>
    <div>
      <h3>Getting content everywhere</h3>
      <a href="#getting-content-everywhere">
        
      </a>
    </div>
    <p>Cloudflare Cache works great for the frequently requested content. Regular requests to the site make sure the content stays in cache. For a typical personal blog, it will be more common that the content stays in cache only in some parts of our vast edge network. With the Automatic Platform Optimization release we wanted to improve loading time for cache cold start from any location in the world. We explored different approaches and decided to use <a href="/introducing-workers-kv/">Workers KV</a> to improve Edge Caching.</p><p>In addition to Cloudflare's CDN cache we put the content into Workers KV. It only requires a single request to the page to cache it and within a minute it is made available to be read back from KV from any Cloudflare data center.</p>
    <div>
      <h3>Updating content</h3>
      <a href="#updating-content">
        
      </a>
    </div>
    <p>After an update has been made to the WordPress website the plugin makes a request to Cloudflare’s API which both purges cache and marks content as stale in KV. The next request for the asset will trigger revalidation of the content. If the plugin is not enabled cache revalidation logic is triggered as detailed previously.</p><p>We serve the stale copy of the content still present in KV and asynchronously fetch new content from the origin, apply possible optimizations and then cache it (both regular local CDN cache and globally in KV).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1UGnbwtDfcNEmZXwV12urw/b1b58beeb7a4c5fee4ad8d5a8d755035/image5-2.png" />
            
            </figure><p>To store the content in KV we use a single namespace. It’s keyed with a combination of a zone identifier and the URL. For instance:</p>
            <pre><code>1:example.com/blog-post-1.html =&gt; "transformed &amp; cached content"</code></pre>
            <p>For marking content as stale in KV we write a new key which will be read from the edge. If the key is present we will revalidate the content.</p>
            <pre><code>stale:1:example.com/blog-post-1.html =&gt; ""</code></pre>
            <p>Once the content was revalidated the stale marker key is deleted.</p>
    <div>
      <h3>Moving optimizations to the edge</h3>
      <a href="#moving-optimizations-to-the-edge">
        
      </a>
    </div>
    <p>On top of caching HTML at the edge, we can pre-process and transform the HTML to make the loading of websites even faster for the user. Moving the development of this feature to our Cloudflare Workers environment makes it easy to add performance features such as improving <a href="/fast-google-fonts-with-cloudflare-workers/">Google Font loading</a>. Using Google Fonts can cause significant performance issues as to load a font requires loading the HTML page; then loading a CSS file and finally loading the font. All of these steps are using different domains.</p><p>The solution is for the worker to inline the CSS and serve the font directly from the edge minimizing the number of connections required.</p><p>If you read through the previous blog post’s implementation it required a lot of manual work to provide streaming HTML processing support and character encodings. As the set of worker APIs have improved over time it is now much simpler to implement. Specifically the addition of a streaming <a href="/html-parsing-2/">HTML rewriter/parser with CSS-selector based API</a> and the ability to suspend the parsing to <a href="/asynchronous-htmlrewriter-for-cloudflare-workers/">asynchronously fetch a resource</a> has reduced the code required to implement this from ~600 lines of source code to under 200.</p>
            <pre><code>export function transform(request, res) {
  return new HTMLRewriter()
    .on("link", {
      async element(e) {
        const src = e.getAttribute("href");
        const rel = e.getAttribute("rel");
        const isGoogleFont =
          src.startsWith("https://fonts.googleapis.com")

        if (isGoogleFont &amp;&amp; rel === "stylesheet") {
          const media = e.getAttribute("media") || "all";
          const id = e.getAttribute("id") || "";
          try {
            const content = await fetchCSS(src, request);
            e.replace(styleTag({ media, id }, content), {
              html: true
            });
          } catch (e) {
            console.error(e);
          }
        }
      }
    })
    .transform(res);
}</code></pre>
            <p>The HTML transformation doesn’t block the response to the user. It’s running as a background task which when complete will update kv and replace the global cached version.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1ShahwSObRage83CdWSfD0/528448594de96d64c0bb442f7e2db875/image1-6.png" />
            
            </figure>
    <div>
      <h3>Making edge publishing generic</h3>
      <a href="#making-edge-publishing-generic">
        
      </a>
    </div>
    <p>We are launching the feature for WordPress specifically but the concept can be applied to any website and content management system (CMS).</p> ]]></content:encoded>
            <category><![CDATA[Automatic Platform Optimization]]></category>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Developers]]></category>
            <guid isPermaLink="false">TmM1U951RKeF4WEDa64px</guid>
            <dc:creator>Yevgen Safronov</dc:creator>
            <dc:creator>Sven Sauleau</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Automatic Platform Optimization, starting with WordPress]]></title>
            <link>https://blog.cloudflare.com/automatic-platform-optimizations-starting-with-wordpress/</link>
            <pubDate>Fri, 02 Oct 2020 13:00:00 GMT</pubDate>
            <description><![CDATA[ Today, we are announcing a new service to serve more than just the static content of your website with the Automatic Platform Optimization (APO) service. With this launch, we're supporting WordPress. ]]></description>
            <content:encoded><![CDATA[ 
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7pBDoI1dESTWbQFz0Vcsa6/76dfc80f250f0dec6cfd442c2a0dae7d/Birthday-Week-OG-images_WordPress_Optimization.png" />
          </figure><p>Today, we are announcing a new service to serve more than just the static content of your website with the <a href="https://www.cloudflare.com/application-services/products/automatic-platform-optimization/">Automatic Platform Optimization (APO)</a> service. With this launch, we are supporting WordPress, the most popular website hosting solution serving 38% of all websites. Our testing, as detailed below, showed a 72% reduction in Time to First Byte (TTFB), 23% reduction to <a href="https://web.dev/fcp/">First Contentful Paint</a>, and 13% reduction in <a href="https://web.dev/speed-index/">Speed Index</a> for desktop users at the 90th percentile, by serving nearly all of your website’s content from Cloudflare’s network. This means visitors to your website see not only the first content sooner but all content more quickly.</p><p>With Automatic Platform Optimization for WordPress, your customers won’t suffer any slowness caused by common issues like shared hosting congestion, slow database lookups, or misbehaving plugins. This service is now available for anyone using WordPress.</p>
    <div>
      <h3>Automatic Platform Optimization Pricing</h3>
      <a href="#automatic-platform-optimization-pricing">
        
      </a>
    </div>
    <p>APO for WordPress costs $5/month for customers on our Free plan and is included, at no additional cost, in our Professional, Business, and Enterprise <a href="https://www.cloudflare.com/plans/">plans</a>. No usage fees, no surprises, <i>just speed</i>.</p>
    <div>
      <h3>How to get started</h3>
      <a href="#how-to-get-started">
        
      </a>
    </div>
    <p>The easiest way to get started with APO is from your WordPress admin console.</p><p><b>1</b>. First, install the <a href="https://wordpress.org/plugins/cloudflare/">Cloudflare WordPress plugin</a> on your WordPress website or update to the latest version (3.8.2 or higher).
<b>2</b>. Authenticate the plugin (<a href="https://wordpress.org/plugins/cloudflare/#installation">steps here</a>) to talk to Cloudflare if you have not already done that.
<b>3</b>. From the Home screen of the Cloudflare section, turn on Automatic Platform Optimization.

Free customers will first be directed to the <a href="https://dash.cloudflare.com/?to=/:account/:zone/speed/optimization">Cloudflare Dashboard</a> to purchase the service.</p>
    <div>
      <h3>Why We Built This</h3>
      <a href="#why-we-built-this">
        
      </a>
    </div>
    <p>At Cloudflare, we jump at the opportunity to make hard problems for our customers disappear with the click of a button. Running a consistently fast website is challenging. Many businesses don’t have the time nor money to spend on complicated and expensive performance solutions for their site. Even if they do, it can be extremely costly to pay for specialized attention to ensure you get the best performance possible. Having a fast website doesn’t have to be complicated, though. <b>The closer your content is to your customers, the better your site will perform.</b> Static content caching does this for files like images, CSS and JavaScript, but that is only part of the equation. Dynamic content is still fetched from the origin incurring costly round trips and additional processing time. For more info on dynamic versus static content, see our <a href="https://www.cloudflare.com/learning/cdn/caching-static-and-dynamic-content/">learning center</a>.</p><p>WordPress is one of the most open platforms in the world, but that means you are always at risk of incurring performance penalties because of plugins or other sources that, while necessary, may be hard to pinpoint and resolve. With the Automatic Platform Optimization service, we put your website into our network that is within 10 milliseconds of 99% of the Internet-connected population in the developed world, all without having to change your existing <a href="https://www.cloudflare.com/developer-platform/solutions/hosting/">hosting</a> provider. This means that for most requests your customers won’t even need to go to your origin, reducing many costly round trips and server processing time. These optimizations run on our edge network, so they also will not impact render or interactivity since no additional JavaScript is run on the client.</p>
    <div>
      <h3>How We Measure Web Performance</h3>
      <a href="#how-we-measure-web-performance">
        
      </a>
    </div>
    <p>Evaluating performance of a website is difficult. There are many different metrics you can track and it is not always obvious which metrics most meaningfully represent a user’s experience. As discussed when we <a href="https://blog.cloudflare.com/new-speed-page/">blogged</a> about our new <a href="https://dash.cloudflare.com/?to=/:account/:zone/speed">Speed page</a>, we aim to simplify this for customers by automating tests using the infrastructure of webpagetest.org, and summarizing both the results visually and numerically in one place.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1NWhWuNJ3uph9V9GZVw1aW/be579629678a74e01792f6c6c6f56330/image4-2.png" />
          </figure><p>The visualization gives you a clear idea of what customers are going to see when they come to your site, and the <i>Critical Loading Times</i> provide the most important metrics to judge your performance. On top of seeing your site’s performance, we provide a list of recommendations for ways to even further increase your performance. If you are using WordPress, then we will test your site with Automatic Platform Optimizations to estimate the benefit you will get with the service.</p>
    <div>
      <h3>The Benefits of Automatic Platform Optimization</h3>
      <a href="#the-benefits-of-automatic-platform-optimization">
        
      </a>
    </div>
    <p>We tested APO on over 500 Cloudflare customer websites that run on WordPress to understand what the performance improvements would be. The results speak for themselves:</p><p><b>Test Results</b></p>
<table><thead>
  <tr>
    <th><span>Metric</span></th>
    <th><span>Percentiles</span></th>
    <th><span>Baseline Cloudflare</span></th>
    <th><span>APO Enabled</span></th>
    <th><span>Improvement (%)</span></th>
  </tr></thead>
<tbody>
  <tr>
    <td><span>Time to First Byte (TTFB)</span></td>
    <td>90th</td>
    <td>1252 ms</td>
    <td>351 ms</td>
    <td>71.96%</td>
  </tr>
  <tr>
    <td>10th</td>
    <td>254 ms</td>
    <td>261 ms</td>
    <td>-2.76%</td>
  </tr>
  <tr>
    <td><a href="http://web.archive.org/web/20210503002739/https://web.dev/fcp/"><span>First Contentful Paint</span></a><br /><span>(FCP)</span></td>
    <td><span>90th</span></td>
    <td>2655 ms</td>
    <td>2056 ms</td>
    <td>22.55%</td>
  </tr>
  <tr>
    <td><span>10th</span></td>
    <td>894 ms</td>
    <td>783 ms</td>
    <td>12.46%</td>
  </tr>
  <tr>
    <td><a href="http://web.archive.org/web/20210503002739/https://web.dev/speed-index/"><span>Speed Index</span></a><br /><span>(SI)</span></td>
    <td><span>90th</span></td>
    <td>6428</td>
    <td>5586</td>
    <td>13.11%</td>
  </tr>
  <tr>
    <td><span>10th</span></td>
    <td>1301</td>
    <td>1242</td>
    <td>4.52%</td>
  </tr>
</tbody></table><p>Note: Results are based on test results of 505 randomly selected websites that are cached by Cloudflare. Tests were run using WebPageTest from South Carolina, USA and the following environment: Chrome, Cable connection speed.</p><p>Most importantly, with APO, a site’s TTFB is made both fast and consistent. Because we now serve the HTML from Cloudflare’s edge with 0 origin processing time, getting the first byte to the eyeball is consistently fast. Under heavy load, a WordPress origin can suffer delays in building the HTML and returning it to visitors. APO removes the variance due to load resulting in consistent TTFB &lt;400 ms.</p><p>Additionally, between faster TTFB and additional caching of third party fonts, we see performance improvements in both FCP and SI for both the fastest and slowest of the sites we tested. Some of this comes naturally from reducing the TTFB, since every millisecond you shave off of TTFB is a potential millisecond gain for other metrics. Caching additional third party fonts allows us to reduce the time it takes to fetch that content. Given fonts can often block paints due to text rendering, this improves the rate at which the page paints, and improves the Speed Index.</p><p>We asked the folks at <a href="https://kinsta.com/">Kinsta</a> to try out APO, given their expertise on WordPress, and tell us what they think. <a href="https://brianli.com/">Brian Li</a>, a Website Content Manager at Kinsta, ran a set of tests from around the world on a website hosted in Tokyo. I’ll let him explain what they did and the results:</p><blockquote><p>At Kinsta, <a href="https://kinsta.com/blog/fastest-wordpress-hosting/">WordPress performance</a> is something that’s near and dear to our hearts. So, when Cloudflare reached out about testing their new Automatic Platform Optimization (APO) service for WordPress, we were all ears.
 
This is what we did to test out the new service:</p></blockquote><ol><li><p>We set up a test site in Tokyo, Japan – one of the 24 high-performance <a href="https://kinsta.com/knowledgebase/google-cloud-data-center-locations/">data center locations</a> available for Kinsta customers.</p></li><li><p>We ran several speed tests from six different locations around the world with and without Cloudflare’s APO.</p></li></ol><blockquote><p>The results were incredible!
 
By caching <a href="https://kinsta.com/blog/wordpress-vs-static-html/">static HTML</a> on Cloudflare’s edge network, we saw a 70-300% performance increase. As expected, the testing locations furthest away from Tokyo saw the biggest reduction in <a href="https://kinsta.com/blog/ttfb/">load time</a>.
 
If your WordPress site uses a traditional <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDN</a> that only caches CSS, JS, and images, upgrading to Cloudflare’s WordPress APO is a no-brainer and will help you stay competitive with modern Jamstack and static sites that live on the edge by default.</p></blockquote><p>Brian’s test results are summarized in this image:</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6gDzHYWY75hKTwwHOoi6Xz/17e3e423683f032d12d22407bccf74a2/image1-7.png" />
          </figure><p><sub>Page Load Speeds for loading a website hosted in Tokyo from 6 locations worldwide - comparing Kinsta, Kinsta with KeyCDN, and Kinsta with Cloudflare APO.</sub></p><p>One of the clear benefits, from Kinsta’s testing of APO, is the consistency of performance for serving your site no matter where your visitors are in the world. The consistent sub-second performance shown with APO versus two or three second load times in other setups makes it clear that if you have a global customer base, APO delivers an improved experience for all visitors.</p>
    <div>
      <h3>How Automatic Platform Optimization Works</h3>
      <a href="#how-automatic-platform-optimization-works">
        
      </a>
    </div>
    <p>Automatic Platform Optimization is the result of being able to use the power of <a href="https://www.cloudflare.com/developer-platform/workers/">Cloudflare Workers</a> to intelligently cache dynamic content. By caching dynamic content, we can serve the entire website from our edge network. Think ‘static site’ but without any of the work of having to build or maintain a static site. Customers can keep managing and updating content on their website in the same way and leave the hard work for performance to us. Serving both static and dynamic content from our network results, generally, in no origin requests or origin processing time. This means all the communication occurs between the user’s device and our edge. Reducing the multitude of round trips typically required from our edge to the origin for dynamic content is what makes this service so effective. Let’s first see what it normally looks like to load a WordPress site for a visitor.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/nNaWWkM0X15Pp0jwnO0Hc/3c3b17b0325638bdb93e844654f2b92b/image3-3.png" />
          </figure><p><sub>A sequence diagram for a typical user visiting a site‌‌</sub></p><p>In a regular request flow, Cloudflare is able to cache some of the content like images, CSS, or JS, while other requests go to either the origin or a third party service in order to fetch the content. Most importantly the first request to fetch the HTML for the site needs to go to the origin which is a typical cause of long TTFB, since no other requests get made until the client can receive the HTML and parse it to make subsequent requests.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/rbLsPASTNRFCNN5E1ySpm/edc2cc24486bc03730ebf0980654c834/image2-2.png" />
          </figure><p><sub>The same site visit but with APO enabled.</sub></p><p>Once APO is enabled, all those trips to the origin are removed. TTFB benefits greatly because the first hop starts and ends at Cloudflare’s network. This also means the browser starts working on fetching and painting the webpage sooner meaning each paint event occurs earlier. Last by caching third party fonts, we remove additional requests that would need to leave Cloudflare’s network and extend the time to display text to the user. Often, websites use fonts hosted on third-party domains. While this saves bandwidth costs that would be incurred from hosting it on the origin, depending on where those fonts are hosted, it can still be a costly operation to fetch them. By rehosting the fonts and serving them from our cache, we can reduce one of the remaining costly round trips.</p><p>With APO for WordPress, you can say bye bye to database congestion or unwieldy plugins slowing down your customers’ experience. These benefits are stacked on top of our already fast <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/">TLS connection times</a> and industry leading protocol support like HTTP/2 that ensure we are using the most efficient and the fastest way to connect and deliver your website to your customers.</p><p>For customers with WordPress sites that support authenticated sessions, you do not have to worry about us caching content from authenticated users and serving it to others. We bypass the cache on standard WordPress and WooCommerce cookies for authenticated users. This ensures customized content for a specific user is only visible to that user. While this has been available to customers with our Business-level service, it is now available for any WordPress customer that enables APO.</p><p>You might be wondering: “This all sounds great, but what about when I change content on my site?” Because this service works in tandem with our <a href="https://www.cloudflare.com/integrations/wordpress/">WordPress plugin</a>, we are able to understand when you make changes and ensure we quickly purge the content in Cloudflare’s edge and refresh it with the new content. With the plugin installed, we detect content changes and update our edge network worldwide with automatic cache purges. As part of this release, we have updated our WordPress plugin, so whether you use APO, you should upgrade to the latest version today. If you do not or cannot use our WordPress plugin, then APO will still provide the same performance benefits, but may serve stale content for up to 30 minutes and when the content is requested again.</p><p>This service was built on the prototype work originally blogged about <a href="https://blog.cloudflare.com/improving-html-time-to-first-byte/">here</a> and <a href="https://blog.cloudflare.com/fast-google-fonts-with-cloudflare-workers/">here</a>. For a more in depth look at the technical side of the service and how Cloudflare Workers allowed us to build the Automatic Platform Optimization service, see the <a href="https://blog.cloudflare.com/building-automatic-platform-optimization-for-wordpress-using-cloudflare-workers/">accompanying blog post</a>.</p>
    <div>
      <h3>WordPress Today, Other Platforms Coming Soon</h3>
      <a href="#wordpress-today-other-platforms-coming-soon">
        
      </a>
    </div>
    <p>While today’s announcement is focused on supporting WordPress, this is just the start. We plan to bring these same capabilities to other popular platforms used for web hosting. If you operate a platform and are interested in how we may be able to work together to improve things for all your customers, <a href="https://www.cloudflare.com/partners/">please get in touch</a>. If you are running a website, let us know what platform you want to see us bring Automatic Platform Optimization to next.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[TTFB]]></category>
            <category><![CDATA[Automatic Platform Optimization]]></category>
            <guid isPermaLink="false">wrkP5f4p5fxKa7hQACHv6</guid>
            <dc:creator>Garrett Galow</dc:creator>
        </item>
        <item>
            <title><![CDATA[Fast WordPress Sites with Bluehost & Cloudflare Workers]]></title>
            <link>https://blog.cloudflare.com/fast-wordpress-sites-with-bluehost-cloudflare-workers/</link>
            <pubDate>Thu, 05 Sep 2019 14:24:06 GMT</pubDate>
            <description><![CDATA[ WordPress is the most popular CMS (content management system) in the world, powering over a third of the top 10 million websites, according to W3Techs. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1tHgUnYkBT1dWwLoktyzol/1791892c6532682bf37d7185c9497391/Workers-General.png" />
            
            </figure><p>WordPress is the most popular CMS (content management system) in the world, powering over a third of the top 10 million websites, according to <a href="https://w3techs.com/technologies/details/cm-wordpress/all/all">W3Techs</a>.</p><p>WordPress is an open source software project that many website service providers host for end customers to enable them to build WordPress sites and serve that content to visitors over the Internet.  For <a href="https://www.cloudflare.com/developer-platform/solutions/hosting/">hosting</a> providers, one of the opportunities and challenges is to host one version of WordPress on their infrastructure that is high performing for all their customers without modifying the WordPress code on a per customer basis.</p><p>Hosting providers are increasingly turning to Cloudflare’s <a href="https://workers.cloudflare.com">Serverless Workers Platform</a> to deliver high performance to their end customers by fixing performance issues at the edge while avoiding modifying code on an individual site basis.</p><p>One innovative WordPress hosting provider that Cloudflare has been working with to do this is <a href="https://www.bluehost.com">Bluehost, a recommended web host by WordPress.org</a>. In collaboration with Bluehost, Cloudflare’s Workers have been able to achieve a 40% performance improvement for those sites running Workers. Bluehost started with Cloudflare Workers <a href="https://github.com/cloudflare/worker-examples/tree/master/examples/fast-google-fonts">code</a> for <a href="/fast-google-fonts-with-cloudflare-workers/">Fast Google Fonts</a> which in-lines the browser-specific font CSS and re-hosts the font files through the page origin. This removes the multiple calls to load the CSS and the font file from Google and improves WordPress site response time.  Bluehost then went further and added additional <a href="https://github.com/pmeenan/cf-workers/tree/master/streaming-optimizations">performance enhancements</a> that rehosted commonly run third party scripts and caches dynamic HTML on the edge in conjunction with Bluehost’s own plugin infrastructure.</p><p>Bluehost will offer Cloudflare Workers in early 2020. Once implemented, customers will see faster response times, which could result in more website visitors sticking with the site while it renders. Additional benefits could include improved ad dollars from a higher number of impressions and ecommerce revenue from more shoppers.</p><p>“We were so impressed to see a 40% performance improvement for websites leveraging Workers, and can’t wait to offer this to our customers in 2020. Our team is excited to partner with Cloudflare and continue to innovate with Workers for added benefits for our customers,” said Suhaib Zaheer, General Manager for Bluehost.</p><p>Stay tuned for more performance improvements with Cloudflare Workers!</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">7KRVRxd0sB2XbeHdPhljBq</guid>
            <dc:creator>Peter Dumanian</dc:creator>
        </item>
        <item>
            <title><![CDATA[Improving HTML Time to First Byte]]></title>
            <link>https://blog.cloudflare.com/improving-html-time-to-first-byte/</link>
            <pubDate>Mon, 24 Dec 2018 16:00:00 GMT</pubDate>
            <description><![CDATA[ Fixing slow Time To First Byte by edge-caching HTML with Cloudflare Workers and automatically purging the cache when content changes. ]]></description>
            <content:encoded><![CDATA[ <p>The Time to First Byte (TTFB) of a site is the time from when the user starts navigating until the HTML for the page they requested starts to arrive. A slow TTFB has been the bane of my existence for more than the ten years I have been running <a href="https://www.webpagetest.org/">WebPageTest</a>.</p><blockquote><p>Looking at a recent test data set (~100k pages):</p><p>20% TTFB &gt; 3s80% start render &gt; 5s (10% &gt; 10s)500 pages were &gt; 15MB</p><p>So much slow to fix</p><p>— Patrick Meenan (@patmeenan) <a href="https://twitter.com/patmeenan/status/763372155052494852?ref_src=twsrc%5Etfw">August 10, 2016</a></p></blockquote><p>There is a reason why TTFB appears as one of the few “grades” that WebPageTest scores a site on and, specifically, why it is the first grade in the list.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5iHQ0NllN5RpGlBfhbLVlf/8c2533c93b2b31493ffb242d9eb3d39c/grades.png" />
            
            </figure><p>If the first byte is slow, <b>EVERY</b> other metric will also be slow. Improving it is one of the few cases where you can predict what the impact will be on every other measurement. Every millisecond improvement in the TTFB translates directly into a millisecond of savings in every other measurement (i.e. first paint will be 500ms faster if TTFB improves by 500ms). That said, a fast ttfb doesn't guarantee a fast experience but a slow ttfb does guarantee a slow experience. I’d estimate that roughly 50% of all requests for help with WebPageTest results come from site owners struggling with a slow TTFB.</p><p>Many things can roll up into the TTFB, including redirects, DNS, connection setup, SSL negotiation and the actual server response time. Most of them can be fixed relatively easily by using a service like Cloudflare, but the server response time for the HTML itself is often the biggest problem and the hardest one to solve.</p><p>The waterfall diagram below shows the server response time as a light blue bar on the first request and it can be painfully obvious when it is slow. Under optimal conditions, the server response time would be no longer than the orange socket connect bar right before it.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1d4Qf5SYp9fq9xwMqDz0X7/c8c271c1bd0b9067a8b5dd38fe7272cb/waterfall.png" />
            
            </figure><p>Over three seconds for the server to respond.</p><p>Slow origin response times can be caused by an enormous assortment of issues from the server configuration, system load, back-end databases and systems it talks to, to the application code itself. Getting to the root of the performance issues usually involves teams of <a href="https://en.wikipedia.org/wiki/DevOps">Dev Ops</a> engineers working with <a href="https://en.wikipedia.org/wiki/Application_performance_management">Application Performance Management</a> tools to track down the slowest parts of the application and improve them.</p><p>A huge portion of the site owners I have worked with don’t have the resources or expertise to handle that kind of an investigation. More often than not, they paid someone a one-time development fee to build their site or built it themselves on WordPress and are hosting it on the lowest-cost hosting they could find. The hosting is generally designed to run as many sites as possible, not necessarily for the highest performance.</p>
    <div>
      <h3>Edge Caching of HTML</h3>
      <a href="#edge-caching-of-html">
        
      </a>
    </div>
    <p>The thing is, most HTML isn’t really dynamic. It needs to be able to change relatively quickly when the site is updated but for a huge portion of the web the content is static for months or years at a time.</p><p>There are special cases like when a user is logged-in (as the admin or otherwise) where the content needs to differ but the vast majority of visits are of anonymous users. If the HTML can be cached and served directly from the edge then the performance gains can be substantial (over 3 seconds faster on all metrics in this case).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/R2m58YwFuerJYN12M3hUB/37d378173e889283fea9dc67877a2258/waterfall-fast.png" />
            
            </figure><p>Much faster server response time.</p><p>There are dozens of plugins for WordPress for caching content at the origin but they require configuration (where to cache the pages) and the performance still depends heavily on the performance of the hosting itself. Pushing the content cache further out to the edge reduces the complexity, eliminates the additional time to get back to the origin and completely removes the hosting performance from the equation. It can also significantly reduce the load on the hosting systems by offloading all of the anonymous traffic.</p><p>Cloudflare supports <a href="https://support.cloudflare.com/hc/en-us/articles/236166048-Caching-Static-HTML-with-WordPress-WooCommerce">caching static HTML</a>, and business and enterprise customers can enable logged-in users to skip the cache by enabling “bypass cache on cookies”. It works in tandem with the <a href="https://wordpress.org/plugins/cloudflare/">Cloudflare plugin for WordPress</a> so the cache can be cleared whenever content is updated. There are also several other caching plugins that integrate with various CDN’s but in all of the cases they need to be configured with API keys for the CDN and the implementations are specific for each <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDN</a>.</p>
    <div>
      <h3>Zero-Config Edge Caching of HTML</h3>
      <a href="#zero-config-edge-caching-of-html">
        
      </a>
    </div>
    <p>For broad adoption, we need to make the caching of HTML happen automatically (or as close to automatically as possible). To that end, we need a way to communicate between an origin (like a WordPress site) and an edge cache (like Cloudflare’s edge nodes) for managing a remote cache that can be explicitly purged.</p><p>The Origin needs to be able to:</p><ul><li><p>Recognize when there is a supported edge cache in front of it.</p></li><li><p>Specify content that should be cached and for what visitors (i.e. visits without a login cookie).</p></li><li><p>Purge the cached content when it has changed (globally across all edges).</p></li></ul><p>Instead of requiring the origin to integrate with an API for purging on changes and requiring manual configuration for what to cache an when we can accomplish everything using HTTP headers on the requests that travel back and forth between the edges and the origin:</p><p>1 - A HTTP header is added to requests going from the edge to the origin to advertise that there is an edge cache present and the capabilities it supports:</p>
            <pre><code>x-HTML-Edge-Cache: supports=cache|purgeall|bypass-cookies</code></pre>
            
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tfQw4SOOYyLEH9A5vh2r4/3649c6ed8e6bbdb820c177578918df50/get.png" />
            
            </figure><p>2 - When the origin responds with a cacheable page it adds a HTTP header on the response to indicate that it should be cached and any rules for when the cached version shouldn’t be used (to allow for bypassing the cache for logged-in users):</p>
            <pre><code>x-HTML-Edge-Cache: cache,bypass-cookies=wp-|wordpress</code></pre>
            
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1HwyqHZHGiPJ2j0gWUfJ53/5180629ff2eb00c82d818d5a2b586185/get-response.png" />
            
            </figure><p>In this case the HTML will be cached but any requests that have cookies that start with “wordpress” or “wp-” for the cookie name will bypass the cache and go to the origin.</p><p>3 - When a request modifies the site content (updating a post, changing a theme, adding a comment) the origin adds a HTTP response header indicating that the cache needs to be purged:</p>
            <pre><code>x-HTML-Edge-Cache: purgeall</code></pre>
            
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4NILAqCLxBNnIwqCTjsouk/f5c48495f50802834141c14439bcaa64/update.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/50w7jP4OiHH0qUlhpDZ5cq/8fb6d2b42e2520cd56a9f3a12fc0b553/update-response.png" />
            
            </figure><p>The only tricky part to deal with is that the purge needs to clear the cache from ALL of the edges, not just the one edge that the request went through.</p><p>4 - When a new request comes in for HTML that is in the edge cache, the request cookies are checked against the rules for the cached response. If the cookies are not present then the cached version is served; otherwise, the request is passed through to the origin.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2bp0DE4i5Kk8CvfGirSeF/4dc1163e293679930e6e2459c4d1769e/cached.png" />
            
            </figure><p>With this simple header-based command and control interface we can eliminate the need for an origin to talk to an API and for any explicit configuration. It also makes the logic on the origin significantly easier to implement as there is no configuration (or UI) and no need to make any outbound requests to a vendor-specific API. The <a href="https://github.com/cloudflare/worker-examples/blob/master/examples/edge-cache-html/WordPress%20Plugin/cloudflare-page-cache/cloudflare-page-cache.php">example WordPress plugin</a> is less than 50 lines of code and the vast majority of that is hooking up callbacks for all of the events that change content.</p>
    <div>
      <h3>Start Caching today with WordPress and Workers</h3>
      <a href="#start-caching-today-with-wordpress-and-workers">
        
      </a>
    </div>
    <p>One of the things I love most about Workers is that it gives you a fully programmable edge to experiment with ideas and implement your own logic. I created a <a href="https://github.com/cloudflare/worker-examples/tree/master/examples/edge-cache-html">Worker script</a> that implements the header-based protocol and edge caching on the Cloudflare edges and a <a href="https://github.com/cloudflare/worker-examples/tree/master/examples/edge-cache-html/WordPress%20Plugin">WordPress plugin</a> that implements the origin logic for WordPress.</p><p>The only tricky part with the Worker was finding a way to purge items from the cache globally. The Worker caches are local to each edge and don’t provide an interface for doing any global operations. One way it does it is to use the Cloudflare API to purge the global cache but that is a bit of a heavy hammer (purging everything from the cache including scripts and images) and it requires some configuration. If you know the specific URLs that will be changed by a content change then doing a targeted purge through the API for just those URLs would probably be the best solution.</p><p>Using the new <a href="https://developers.cloudflare.com/workers/kv/">Workers KV store</a> we can purge the cache a different way. The Worker script uses a versioning scheme for the cache where every URL gets a version number appended to it (i.e. <a href="http://www.example.com/?cf_edge_cache_ver=32">http://www.example.com/?cf_edge_cache_ver=32</a>). The modified URL is only ever used locally by the worker as a key for the cached responses and the current version number is stored in KV which is a global store. When the cache is purged, the version number is incremented which changes the URL for all of the resources. Old entries will age out of the cache normally since they will no longer be accessed. It requires a little configuration to set up KV for the worker but hopefully at some point in the future that can also be automatic.</p>
    <div>
      <h3>What Next?</h3>
      <a href="#what-next">
        
      </a>
    </div>
    <p>I think there is a huge value for the web in standardizing a way for edge caches and origins to communicate for caching of dynamic content. That would provide incentive for content management systems to build support directly into the platforms and provide a standard interface that could be used across different providers (and even for local edge caches in load balancers or other reverse proxies). After doing some more testing with different types of sites I’m planning to bring the concept to the <a href="https://httpwg.org/">IETF HTTP Working Group</a> to see if we can come up with an official standard for the control headers (using different names). If you have opinions about how it should work or what features you’d need exposed I’d love to hear about it (like purging specific URLs, varying content for mobile/desktop or region, expanding it to cover all content types, etc).</p> ]]></content:encoded>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Cloudflare Workers KV]]></category>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Cache]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Programming]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">5laFxx6Dnn1fOzsYGSkAuv</guid>
            <dc:creator>Patrick Meenan (Guest Author)</dc:creator>
        </item>
        <item>
            <title><![CDATA[Welcome, WP Engine!]]></title>
            <link>https://blog.cloudflare.com/welcome-wp-engine/</link>
            <pubDate>Wed, 05 Sep 2018 16:50:20 GMT</pubDate>
            <description><![CDATA[ We’ve had the tremendous pleasure of working with WP Engine for nearly 5 years, starting when both companies employed less than 100 people in total.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>We’ve had the tremendous pleasure of working with WP Engine for nearly 5 years, starting when both companies employed fewer than 100 people in total. From the beginning, we noticed striking similarities between our two companies—both were founded in 2010, both are incredibly passionate about their customers’ success, and both strive to make their technology as simple and accessible as possible. Fast forward to 2018: with WP Engine already leveraging Cloudflare for DNS, thousands of mutual WP Engine and Cloudflare customers, and millions of WordPress websites already protected behind Cloudflare, it was a no-brainer to formally partner together.</p><p>Today, we are thrilled to announce WP Engine as a Cloudflare partner! The joint offering, <a href="https://wpengine.com/global-edge-security/"><b>Global Edge Security powered by Cloudflare</b></a>, integrates WP Engine’s platform with Cloudflare’s managed web application firewall (WAF), advanced distributed denial of service mitigation (DDoS), <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL/TLS encryption</a>, and CDN across a global edge network to deliver the world’s most secure and scalable digital experience on WordPress today.</p><p>We couldn’t be more excited about our opportunity to collaborate with WP Engine to deploy business-critical security and CDN edge services to Enterprises and SMBs globally.</p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Partners]]></category>
            <guid isPermaLink="false">6B6zpaSyB6EJ3D8gOqwyoP</guid>
            <dc:creator>Rachele Gyorffy</dc:creator>
        </item>
        <item>
            <title><![CDATA[Protecting everyone from WordPress Content Injection]]></title>
            <link>https://blog.cloudflare.com/protecting-everyone-from-wordpress-content-injection/</link>
            <pubDate>Wed, 01 Feb 2017 16:53:54 GMT</pubDate>
            <description><![CDATA[ Today a severe vulnerability was announced by the WordPress Security Team that allows unauthenticated users to change content on a site using unpatched (below version 4.7.2) WordPress. ]]></description>
            <content:encoded><![CDATA[ <p>Today a severe vulnerability was announced by the <a href="https://make.wordpress.org/core/2017/02/01/disclosure-of-additional-security-fix-in-wordpress-4-7-2/">WordPress Security Team</a> that allows unauthenticated users to change content on a site using unpatched (below version 4.7.2) WordPress.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/utL0SIRsc0DPLObX0eTgR/f43e45e886095489724c5459ffd9aab5/12977337115_19ea7233c8_z.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA 2.0</a> <a href="https://www.flickr.com/photos/quatar/12977337115/in/photolist-kLLfcD-m6QQ9K-q9ahzH-i6thGS-q5GUN3-o54g8R-dAqV34-pbwTN4-pdhTPx-pKEjxp-5AmXEB-ptJHXQ-bhTApi-pNfG3r-oYnMVT-nFpyp5-jVuJZ3-nAwiPG-r9uiAE-9CXRjW-9Cb3Nv-nVEfJP-rg6igk-hz2sEa-pd6xEL-HFSEAG-9Gg2t9-5KFn1C-puzSq6-rmxuj7-nziE1W-nMRZQJ-prTHRW-pcs5S3-fFmD5V-oZv9Pv-ejnMdk-p2DDVW-paNBh3-5Y1U3j-dV9aSt-niAXry-zvQxs-mUJVca-a8yq7r-75Qow8-nMS6ui-njbmKZ-9AZ5vw-k46KRT">image</a> by <a href="https://www.flickr.com/photos/quatar/">Nicola Sap De Mitri</a></p><p>The problem was <a href="https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html">found</a> by the team at Sucuri and reported to WordPress. The WordPress team worked with WAF vendors, including Cloudflare, to roll out protection before the patch became available.</p><p>Earlier this week we rolled out two rules to protect against exploitation of this issue (both types mentioned in the Sucuri blog post). We have been monitoring the situation and have not observed any attempts to exploit this vulnerability before it was announced publicly.</p><p>Customers on a paid plan will find two rules in WAF, WP0025A and WP0025B, that protect unpatched WordPress sites from this vulnerability. If the Cloudflare WordPress ruleset is enabled then these rules are automatically turned on and blocking.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/15B0FJXMnLA2X2AVP4QYwh/8638fb012d9bced9e7edc03b8b1ae0a6/2017-02-01-16-15-38.png" />
            
            </figure>
    <div>
      <h3>Protecting Everyone</h3>
      <a href="#protecting-everyone">
        
      </a>
    </div>
    <p>As we have in the past with other serious and critical vulnerabilities like <a href="/shellshock-protection-enabled-for-all-customers/">Shellshock</a> and <a href="/our-waf-is-keeping-wordpress-jetpack-on-track/">previous issues with JetPack</a>, we have enabled these two rules for our free customers as well.</p><p>Free customers who want full protection for their WordPress sites can upgrade to a <a href="https://www.cloudflare.com/plans/">paid plan</a> and enable the Cloudflare WordPress ruleset in the <a href="https://www.cloudflare.com/waf/">WAF</a>.</p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <guid isPermaLink="false">6ZTsRCzbGkZOEoN1nLnkKS</guid>
            <dc:creator>Ben Cartwright-Cox</dc:creator>
        </item>
        <item>
            <title><![CDATA[CloudFlare’s new WordPress plugin]]></title>
            <link>https://blog.cloudflare.com/new-wordpress-plugin/</link>
            <pubDate>Mon, 19 Sep 2016 20:00:00 GMT</pubDate>
            <description><![CDATA[ Over 25% of all websites use WordPress, and over 10% of all internet traffic flows through CloudFlare; WordPress + CloudFlare has always been a winning combination, and now with CloudFlare’s new WordPress plugin, it's easier than ever to make your site 60% faster. ]]></description>
            <content:encoded><![CDATA[ <p>Over <b>25%</b> of all websites use WordPress, and over <b>10%</b> of all internet traffic flows through CloudFlare; WordPress + CloudFlare has always been a <a href="https://premium.wpmudev.org/blog/improve-performance-and-back-up-with-a-cdn/?utm_expid=3606929-84.YoGL0StOSa-tkbGo-lVlvw.0&amp;utm_referrer=https%3A%2F%2Fwww.google.com%2F">winning combination</a>, and now with CloudFlare’s new WordPress plugin, it's easier than ever to make your site <b>60% faster</b>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4XIIG61odFOI5zkedchVHQ/b1aeb832730771bb61d4d05d8f2b79cf/Untitled.png" />
            
            </figure><p><a href="https://wordpress.org/plugins/cloudflare/installation/">Install or upgrade</a> to CloudFlare's new plugin to speed up your WordPress site.</p><p><a href="https://www.cloudflare.com/wordpress/">Our new plugin</a> adds all of CloudFlare's performance and security benefits in a simple one-click install of recommended settings specifically developed for WordPress.</p>
    <div>
      <h2>What our plugin can do for you</h2>
      <a href="#what-our-plugin-can-do-for-you">
        
      </a>
    </div>
    <p><b>One-click WordPress-optimized settings</b> is the easiest way to setup CloudFlare for your WordPress site.</p><p><b>Web application firewall (WAF) rulesets</b>, available on CloudFlare’s paid plans, has built-in rulesets, including rules that mitigate WordPress specific <a href="https://www.cloudflare.com/learning/security/how-to-improve-wordpress-security/">threats and vulnerabilities</a>. These security rules are always kept up-to-date: once the WAF is enabled, you can rest easy knowing your site is protected from all the latest threats.</p><p><b>Automatic cache purge</b> occurs when you change the appearance of your website. This means that you can focus on your website, while we ensure that the latest content is always available to your visitors.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3BKklsr361kW3ciw0u3b4I/bf9d8b8543976bc3c3e5d78e5c453be5/Untitled-1.png" />
            
            </figure><p>You can also change CloudFlare settings such as the Security Level, Image Optimization, etc. from within the plugin itself without needing to navigate to the cloudflare.com dashboard, and view analytics such as total visitors, bandwidth saved, and threats blocked. In addition the plugin restores your visitors' original IP addresses in your WordPress logs.</p>
    <div>
      <h2>FAQ</h2>
      <a href="#faq">
        
      </a>
    </div>
    <p><b>Do I need a CloudFlare account to use the plugin?</b></p><p>Yes, on install and activation the plugin, first time users will be asked to enter their email address (used to sign-up for an account at cloudflare.com) and their user API key. This is needed to support all the features offered by the plugin.</p><p><b>How do I install the plugin?</b></p><p>A few clicks are all it takes to <a href="https://wordpress.org/plugins/cloudflare/installation/">install the plugin</a> from your WordPress admin dashboard.</p><p><b>What settings are applied when I click "Apply Default Settings" in CloudFlare's WordPress plugin?</b></p><p>You can review the recommended settings that are applied <a href="https://support.cloudflare.com/hc/en-us/articles/227342487">here</a>.</p><p>Any more questions or feedback? We’d love to hear from you in the comments.</p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Reliability]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">5GEwGooKhrxwh6cHC9WMKa</guid>
            <dc:creator>Rahul Mahajan</dc:creator>
        </item>
        <item>
            <title><![CDATA[A Look at the New WordPress Brute Force Amplification Attack]]></title>
            <link>https://blog.cloudflare.com/a-look-at-the-new-wordpress-brute-force-amplification-attack/</link>
            <pubDate>Fri, 16 Oct 2015 17:14:32 GMT</pubDate>
            <description><![CDATA[ Recently, a new brute force attack method for WordPress instances was identified by Sucuri. This latest technique allows attackers to try a large number of WordPress username and password login combinations in a single HTTP request. ]]></description>
            <content:encoded><![CDATA[ <p>Recently, a new brute force attack method for WordPress instances was identified by Sucuri. This latest technique allows attackers to try a large number of WordPress username and password login combinations in a single HTTP request.</p><p>The vulnerability can easily be abused by a simple script to try a significant number of username and password combinations with a relatively small number of HTTP requests. The following diagram shows a 4-fold increase in login attempts to HTTP requests, but this can trivially be expanded to a thousand logins.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6jdeVX3b5JHTMwZvY4J7wY/3db3519b348381101ef3bdd943e6e636/wordpress-xmlrpc-brute-force-amplification.png" />
            
            </figure><p>This form of brute force attack is harder to detect, since you won’t necessarily see a flood of requests. Fortunately, all CloudFlare paid customers have the option to enable a Web Application Firewall ruleset to stop this new attack method.</p>
    <div>
      <h3>What is XML-RPC?</h3>
      <a href="#what-is-xml-rpc">
        
      </a>
    </div>
    <p>To understand the vulnerability, it’s important to understand the basics of the XML remote procedure protocol (XML-RPC).</p><p>XML-RPC uses XML encoding over HTTP to provide a remote procedure call protocol. It’s commonly used to execute various <a href="https://codex.wordpress.org/XML-RPC_WordPress_API">functions in a WordPress instance</a> for APIs and other automated tasks. Requests that modify, manipulate, or view data using XML-RPC require user credentials with sufficient permissions.</p><p>Here is an example that requests a list of the user’s blogs:</p>
            <pre><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
&lt;methodCall&gt;
&lt;methodName&gt;wp.getUsersBlogs&lt;/methodName&gt;
&lt;params&gt;
 &lt;param&gt;
  &lt;value&gt;
   &lt;string&gt;admin&lt;/string&gt;
  &lt;/value&gt;
 &lt;/param&gt;
 &lt;param&gt;
  &lt;value&gt;
   &lt;string&gt;password123&lt;/string&gt;
  &lt;/value&gt;
 &lt;/param&gt;
&lt;/params&gt;
&lt;/methodCall&gt;</code></pre>
            <p>The server responds with an XML message containing the requested information. The <code>isAdmin</code> name-value pair tells us our credentials were correct:</p>
            <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;methodResponse&gt;
&lt;params&gt;
	&lt;param&gt;
	  &lt;value&gt;
	  &lt;array&gt;&lt;data&gt;
	  &lt;value&gt;&lt;struct&gt;
	  &lt;member&gt;
		&lt;name&gt;isAdmin&lt;/name&gt;
		&lt;value&gt;&lt;boolean&gt;1&lt;/boolean&gt;&lt;/value&gt;
	  &lt;/member&gt;
	  &lt;member&gt;
		&lt;name&gt;url&lt;/name&gt;
		&lt;value&gt;&lt;string&gt;http://example.com/&lt;/string&gt;&lt;/value&gt;
	  &lt;/member&gt;
	  &lt;member&gt;
		&lt;name&gt;blogid&lt;/name&gt;
		&lt;value&gt;&lt;string&gt;1&lt;/string&gt;&lt;/value&gt;
	  &lt;/member&gt;
	  &lt;member&gt;
		&lt;name&gt;blogName&lt;/name&gt;
		&lt;value&gt;&lt;string&gt;testing&lt;/string&gt;&lt;/value&gt;
	  &lt;/member&gt;
	  &lt;member&gt;
		&lt;name&gt;xmlrpc&lt;/name&gt;
		&lt;value&gt;&lt;string&gt;http://example.com/xmlrpc.php&lt;/string&gt;&lt;/value&gt;
	  &lt;/member&gt;
	  &lt;/struct&gt;&lt;/value&gt;
	  &lt;/data&gt;&lt;/array&gt;
	  &lt;/value&gt;
	&lt;/param&gt;
&lt;/params&gt;
&lt;/methodResponse&gt;</code></pre>
            <p>As shown in this request, you must provide proper authentication to get a successful response. You can, in theory, create a script that tries different combinations of the username and password, but that is a noisy option that isn’t very effective and is easily detected (the server logs would show a flood of failed login attempts).</p><p>This is where the <code>system.multicall</code> functionality comes into play. You can run multiple methods with a single HTTP request. This is useful for mass editing blogs or deleting large numbers of comments, etc. Any method that requires authentication can be abused to brute force credentials. Here is what a sample XML <code>system.multicall</code> payload would look like:</p>
            <pre><code>&lt;?xml version="1.0"?&gt;
&lt;methodCall&gt;
&lt;methodName&gt;system.multicall&lt;/methodName&gt;
&lt;params&gt;
  &lt;param&gt;&lt;value&gt;&lt;array&gt;&lt;data&gt;
  &lt;value&gt;&lt;struct&gt;
  &lt;member&gt;
	&lt;name&gt;methodName&lt;/name&gt;
	&lt;value&gt;&lt;string&gt;wp.getUsersBlogs&lt;/string&gt;&lt;/value&gt;
  &lt;/member&gt;
  &lt;member&gt;
	&lt;name&gt;params&lt;/name&gt;&lt;value&gt;&lt;array&gt;&lt;data&gt;
	&lt;value&gt;&lt;array&gt;&lt;data&gt;
	&lt;value&gt;&lt;string&gt;admin&lt;/string&gt;&lt;/value&gt;
	&lt;value&gt;&lt;string&gt;password&lt;/string&gt;&lt;/value&gt;
	&lt;/data&gt;&lt;/array&gt;&lt;/value&gt;
	&lt;/data&gt;&lt;/array&gt;&lt;/value&gt;
  &lt;/member&gt;
  &lt;/struct&gt;&lt;/value&gt;
  &lt;value&gt;&lt;struct&gt;
  &lt;member&gt;
	&lt;name&gt;methodName&lt;/name&gt;
	&lt;value&gt;&lt;string&gt;wp.getUsersBlogs&lt;/string&gt;&lt;/value&gt;
  &lt;/member&gt;
  &lt;member&gt;
	&lt;name&gt;params&lt;/name&gt;
	&lt;value&gt;&lt;array&gt;&lt;data&gt;
	&lt;value&gt;&lt;array&gt;&lt;data&gt;
	  &lt;value&gt;&lt;string&gt;admin&lt;/string&gt;&lt;/value&gt;
	  &lt;value&gt;&lt;string&gt;password&lt;/string&gt;&lt;/value&gt;
	  &lt;/data&gt;&lt;/array&gt;&lt;/value&gt;
	&lt;/data&gt;&lt;/array&gt;&lt;/value&gt;
  &lt;/member&gt;
  &lt;/struct&gt;&lt;/value&gt;
  &lt;/data&gt;&lt;/array&gt;&lt;/value&gt;
  &lt;/param&gt;
&lt;/params&gt;
&lt;/methodCall&gt;</code></pre>
            <p>As you can see, this can lead to very obvious abuse.</p>
    <div>
      <h3>Exploitation</h3>
      <a href="#exploitation">
        
      </a>
    </div>
    <p>During testing, I was able to call the method <code>wp.getUserBlogs</code> 1,000 times in a single HTTP request (limited only by PHP memory issues). If a user creates a simple shell loop that executes one thousand times and runs a PHP script that crafts an HTTP request with one thousand method calls all requiring authentication, then that user would be able to try one million unique logins in a very short period of time.</p><p>This makes brute forcing the login very fast and can run down a pretty large wordlist in a short period of time. Also note that the <code>wp.getUserBlogs</code> method isn’t the only RPC call requiring authentication. It’s possible to use any RPC method which requires authentication to attempt logins and brute force the Wordpress credentials.</p>
    <div>
      <h3>CloudFlare Customers Are Protected</h3>
      <a href="#cloudflare-customers-are-protected">
        
      </a>
    </div>
    <p>When using CloudFlare with a Pro level plan or higher, you have the ability to turn on the Web Application Firewall (WAF) and take advantage of the new WordPress ruleset I created to mitigate this attack—all without any major interaction or supervision on your end.</p><p>Our WAF works by checking HTTP requests for consistencies that line up with known attacks and malicious activities. If a request does appear to be malicious, we drop it at the edge so it never even reaches the customer’s origin server.</p><p>To enable the rule, navigate to your CloudFlare Firewall dashboard, and reference the rule named "Blocks amplified brute force attempts to xmlrpc.php" with the rule ID WP0018.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4UjJTAaaGerRJ928DM0NGv/cc569d79f7675aafdf10d83ef73ea4cc/enabling-xmlrpc-waf-rule.png" />
            
            </figure><p>That’s all there is to it. Now you are protected from the new WordPress XML-RPC brute force amplification attack.</p>
    <div>
      <h3>The Manual Solution</h3>
      <a href="#the-manual-solution">
        
      </a>
    </div>
    <p>Another way to mitigate this attack is by disabling the ability to call the<code>system.multicall</code> method in your Wordpress installation by editing your<code>functions.php</code> file. Adding the function <code>mmx_remove_xmlrpc_methods()</code> will alleviate the problem, like so:</p>
            <pre><code>function mmx_remove_xmlrpc_methods( $methods ) {
	unset( $methods['system.multicall'] );
	return $methods;
}
add_filter( 'xmlrpc_methods', 'mmx_remove_xmlrpc_methods');</code></pre>
            
    <div>
      <h3>Final Thoughts</h3>
      <a href="#final-thoughts">
        
      </a>
    </div>
    <p>XML-RPC can be a useful tool for making changes to WordPress and other web applications; however, improper implementation of certain features can result in unintended consequences. Default-on methods like <code>system.multicall</code> and <code>pingback.ping</code> (we have a <a href="/wordpress-pingback-attacks-and-our-waf/">WAF rule for that one</a>, too) are just a few examples of possible exploits.</p><p>Properly configuring the CloudFlare Web Application Firewall for your Internet facing properties will protect you from such attacks with no changes to your server configuration.</p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[Reliability]]></category>
            <guid isPermaLink="false">6gLyPOxWVFfvjEC44cNrMg</guid>
            <dc:creator>Pasha Kravtsov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Of Phishing Attacks and WordPress 0days]]></title>
            <link>https://blog.cloudflare.com/of-phishing-attacks-and-wordpress-0days/</link>
            <pubDate>Fri, 24 Apr 2015 00:17:28 GMT</pubDate>
            <description><![CDATA[ Proxying around 5% of the Internet’s requests gives us an interesting vantage point from which to observe malicious behavior. However, it also makes us a target.  ]]></description>
            <content:encoded><![CDATA[ <p>Proxying around 5% of the Internet’s requests gives us an interesting vantage point from which to observe malicious behavior. However, it also makes us a target. Aside from the many and varied denial of service (DDoS) attacks that break against our defenses, we also see huge number of phishing campaigns. In this blog post I'll dissect a recent phishing attack that we detected and neutralized with the help of our friends at Bluehost.</p><p>One attack that is particularly interesting because it appears to be using a brand new WordPress 0day.</p>
    <div>
      <h3>A Day Out Phishing</h3>
      <a href="#a-day-out-phishing">
        
      </a>
    </div>
    <p>The first sign we typically see that indicate a new phishing campaign is underway are the phishing emails themselves. Generally, there's a constant background noise from a few of these emails targeting individual customers every day. However, when a larger campaign starts up that trickle typically turns into a flood of similar messages.</p><p>Here's an example we've recently received:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1ievhyb1PeFa6DJpZUERYP/e3340bc4f8c7c727a7797f060592aca2/Screen-Shot-2015-04-20-at-9-28-35-PM.png" />
            
            </figure><p><b>Note</b> — CloudFlare will never send you an email like this. If you see one like it, it is fake and should be reported to our abuse team by forwarding it to <a>support@cloudflare.com</a>.</p><p>In terms of the phishing campaign timeline, these emails aren’t the first event. Much like a spider looking to trap flies, a phisher first has to build a web to trap his or her victims. One way is through landing pages.</p><p>Looking like the legitimate login page of a target domain, these landing pages have one goal - to collect your credentials. Since these landing pages are quickly identified, the phisher will often go to great lengths to ensure that he or she can put up tens or even hundreds of pages during the lifetime of a campaign, all while being extra careful that these pages can't be traced back to him or her. Generally, this means compromising a large number of vulnerable websites in order to inject a phishing toolkit.</p><p>It's no surprise that first step in most phishing campaigns will usually be the mass compromise of a large number of vulnerable websites. This is why you will often see a notable uptick in the volume of phishing emails whenever a major vulnerability comes out for one of the popular CMS platforms. This is also why protecting the Internet’s back-office is a critical step in building a better Internet. If vulnerable CMS sites are protected, not only can they flourish, but the thousands of potential victims that could get abused when their infrastructure gets hijacked for malicious purposes are also protected.</p><p>This is why, at CloudFlare, we feel that providing free, basic security to every website is such important thing and why ultimately it could be such a game changer in building a better Internet.</p>
    <div>
      <h3>Back to the phish</h3>
      <a href="#back-to-the-phish">
        
      </a>
    </div>
    <p>Returning to our phishing attack, we see that it's no different. Analyzing the “load.cloudflare.com” hyperlink on the message, we see that it's actually a link pointing to a compromised WordPress site hosted by Bluehost.</p><p><b>Note</b>: This is not a reflection on Bluehost, <i>every</i> hosting provider gets targeted at some point. What's more important is how those hosting providers subsequently respond to reports of compromised sites. In fact, Bluehost should be commended for the speed with which they responded to our requests and the way they handled the affected sites we reported.</p><p>Every other email in this particular campaign followed the same pattern. Here is the source for another one of those links that uses “activate.cloudflare.com”:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2ULCZgjAD8uyU95cBQbqaN/b2b2f208706b31f20baa566c2a51dc44/Screen-Shot-2015-04-21-at-12-05-54-PM-1.png" />
            
            </figure><p>As you can see, while the message will display that you are going to “activate.cloudflare.com”, in reality, anyone that clicks on the link will be diverted to the victim website. Which, unsurprisingly, is running an old, vulnerable version of WordPress.</p><p>Every phishing email from this campaign has followed exactly the same pattern: a basic email template addressed to $customer informing them that their site has been locked, and inviting them to click on a link that takes them to a compromised WordPress site on Bluehost.</p><p>It looks like is this attacker harvested a large number of target domains using public DNS and email records identifying administrative email addresses. This became the victim list. The attacker then targeted a convenient, vulnerable CMS platform and injected his or her phishing kit into every innocent domain that's been compromised. Finally, once that is complete the attacker will send out the phishing emails to the victim list.</p><p>As phishing attacks go, this one is remarkably unsophisticated. All a savvy user had to do to reveal the true nature of this link is a quick mouse over. As soon as you do mouse over, the link you will see -- “activate.cloudflare.com” -- does not match the true destination.</p>
    <div>
      <h3>More advanced phishing techniques</h3>
      <a href="#more-advanced-phishing-techniques">
        
      </a>
    </div>
    <p>A clever phisher could have used one of the many well known tricks to obfuscate the URL. Below are some of those techniques possible so you will know them if you see them.</p><ul><li><p><b>Image Maps.</b> Instead of using a traditional hyperlink as above, phishers have been known to put an image map in their emails. The image, of course, is of a link to a trusted site such as “<a href="http://www.safesite.com”">www.safesite.com”</a>. When an unsuspecting user clicks within the coordinates of the image map, they are diverted to the phishing site.</p></li></ul><p>Here's an example of this technique taken from an old eBay phishing email:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2hUdm0YKA9SAePdOwS8svI/7f5004c93f8005e532a354701a686e0c/Screen-Shot-2015-04-21-at-12-22-59-PM.png" />
            
            </figure><p>In order to fool Bayesian filters looking for phishing spam like this, the phisher also added some legitimate sounding words in white font to keep them from appearing. The user experience, however, is the same as the earlier phishing email. As soon as you mouse over the image map, you will see the true destination.</p><ul><li><p><b>Misspelled domain names and homoglyphs.</b> Misspelled domains can look very similar to their legitimate counterparts and by using a homoglyph -- or look-a-like character -- an attacker can make a misspelling look even less obvious. Examples include “microsft.com” or “g00gle.com” These domains look so similar to the advertised link in the phishing email that many people will miss the discrepancy when they mouse over the link.</p></li><li><p><b>Reflection, Redirection, and javascript.</b> Many websites -- even sites like answers.usa.gov -- have search features, offsite links, or vulnerable pages that have historically been abused by phishers. If the offsite link can be manipulated, typically with a cross site scripting vulnerability, it's possible for the phisher to present a link from the target domain that takes the victim to a page under the Phisher’s control. Below is an example of a historic flaw of this nature that existed on the answers.usa.gov site</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6WjPNtZuHPsd99hwLkYDWF/128bfd7419ccbfe97951a06b03e05f3a/Screen-Shot-2015-04-21-at-12-42-07-PM.png" />
            
            </figure><p>In this case, the URL looks like a legitimate “answers.usa.gov” ur,l but if you clicked on it, you would activate a cross-site scripting flaw that executes the javascript in your browser. The attacker could easily turn a page with this sort of flaw into a malicious credential harvester, all while continuing to use a link to the legitimate site.</p><p><b>Note</b> - All those extra %20’s are encoded spaces to push the javascript far enough away that it won’t be visible on mouse over.</p><p>A slightly different flaw, also on the USA.gov site, involved its URL shortening service. Open to anyone, Phishers quickly discovered that they could use this service to create shortened URLs that looked important because of the .gov prefix. A victim that might be reluctant to click on an unsolicited bit.ly link might be less reluctant if faced with a .gov link. Here's an example of an email from a campaign abusing that service:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5ZYcFpcPq9WSpiGmzpzCNo/224cd6d4e3e89131942380392064a635/page-threats-govt-spam1.jpg" />
            
            </figure><ul><li><p><b>URL obfuscation.</b> Historically, this has been one of the most popular and varied techniques. The concept is simple: use any of the available URL encoding methods to disguise the true nature of the destination URL. I'll describe a couple of historic techniques below.</p></li></ul><p><b>Note</b>: many modern browsers now warn against some of these techniques.</p><p><b>First</b> is username:password@url abuse. This notation, now deprecated because only an idiot would pass credentials in the HTTP query string these days, was designed to allow seamless access to password protected areas. Abuse is easy, for example:</p><p><a>www.safesite.com@www.evilsite.com</a></p><p><b>Next</b> is IP address obfuscation. You are probably familiar with the IP address as a dotted quad? 123.123.123.123 Well, IP addresses can also be expressed in a number of other formats which browsers will accept. By combining this with the “username:password@” trick above, an attacker can effectively hide his true destination. Below are four different methods for presenting one of Google’s IP addresses -- 74.125.131.105</p><ul><li><p><a href="http://www.safesite.com@74.125.131.105">http://www.safesite.com@74.125.131.105</a></p></li><li><p><a href="http://www.safesite.com@1249739625/">http://www.safesite.com@1249739625/</a></p></li><li><p><a href="http://www.safesite.com@0x4a.0x7d.0x83.0x69/">http://www.safesite.com@0x4a.0x7d.0x83.0x69/</a></p></li><li><p><a href="http://www.safesite.com@0112.0175.0203.0151/">http://www.safesite.com@0112.0175.0203.0151/</a></p></li></ul><p>All of these URLs go to 74.125.131.150.</p><p><b>Finally</b> we have Punycode and Homoglyph based obfuscation. Punycode was created as a way for international characters to map to valid characters for DNS, e.g., “café.com”. Using punycode this would be represented as xn--caf-dma.com. As mentioned at the start, homoglyphs are symbols which closely resemble other symbols, like 0 and O, or I and l.</p><p>By combining these two methods we can create URLs like:</p><p><a href="http://www.safesite.com⁄login.html.evilsite.com">www.safesite.com⁄login.html.evilsite.com</a></p><p>The secret to this obfuscated URL is to use a non-standard character which happens to be a homoglyph for /. The result? Instead of a page on safesite.com, you are actually taken to a subdomain of the following punycode domain:</p><p><a href="http://www.safesite.xn--comlogin-g03d.html.evilsite.com">www.safesite.xn--comlogin-g03d.html.evilsite.com</a></p><p>New obfuscation techniques like these appear all the time. Phishing is both the most common and arguably the most effective method of attack for medium to low skill attackers. Staying up to date with these techniques can be extremely useful when it comes to spotting potential phishing attempts.</p>
    <div>
      <h3>Conclusions</h3>
      <a href="#conclusions">
        
      </a>
    </div>
    <p>After further analysis, it quickly became clear that all of the endpoints in this campaign were compromised WordPress sites running WordPress 4.0 - 4.1.1.</p><p>The most likely scenario is that a new critical vulnerability has surfaced in WordPress 4.1.1 and earlier. Given that 4.1.1 was, at the time of writing, the most current version of WordPress, this can only mean one thing -- a WordPress 0day in the wild.</p><p>Checking the WordPress site confirms that that a few hours ago they announced a new critical cross-site scripting vulnerability:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1eZiSBTqEnOdf34Krrxj06/e21be77b781c78d7fa3ac4d4d68d0498/Screen-Shot-2015-04-21-at-5-11-55-PM.png" />
            
            </figure><p>While we can’t confirm for certain that this is the vulnerability our phisher was using, it seems highly likely given the version numbers compromised.</p><p>Over the last few hours, we've worked closely with our friends at Bluehost to identify the remaining affected sites compromised by this phisher so they could take them offline. A quick response like this essentially renders all remaining phishing emails in this current campaign harmless. The need to quickly neutralize Phishing sites is why CloudFlare engineers developed our own process for rapidly identifying and tagging suspected compromised sites. When a site on our network is flagged as phishing site, we impose an interstitial page that serves to both to warn potential visitors and give the site owner time to fix the issue.</p><p>You can read more about our own process in this <a href="/127760418/">blog post</a>.</p>
    <div>
      <h3>How customers can stay safe</h3>
      <a href="#how-customers-can-stay-safe">
        
      </a>
    </div>
    <p>By enabling the CloudFlare's WAF, CloudFlare customers have some protection against the sort of cross-site scripting vulnerability involved in this attack. However, anyone can still fall victim to a phishing email. Below are 7 tips to help you stay safe:</p><ul><li><p>NEVER click on links in unsolicited emails or advertisements.</p></li><li><p>Be vigilant, poor spelling and strange URLs are dead giveaways.</p></li><li><p>Mouse over the URL and see if it matches the what’s presented in the email.</p></li><li><p>Type URLs in manually where possible.</p></li><li><p>Stay up to date on your software and make sure you are running a current up-to-date antivirus client — yes, even if you're using Mac.</p></li><li><p>It’s possible to set traps for phishers: use unique, specific email addresses for each account you set up. That way if you get an email to you Bank of America email address asking for your Capital One password, you immediately know it's a phishing attack.</p></li><li><p>Finally, where possible enable two-factor authentication. While not foolproof, it makes it much harder for attackers.</p></li></ul> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[DDoS]]></category>
            <category><![CDATA[Abuse]]></category>
            <guid isPermaLink="false">6T3SXr5Tn4n7xTnOtmpmJk</guid>
            <dc:creator>Marc Rogers</dc:creator>
        </item>
        <item>
            <title><![CDATA[Flexible SSL & Wordpress: Fixing “Mixed Content” Errors]]></title>
            <link>https://blog.cloudflare.com/flexible-ssl-wordpress-fixing-mixed-content-errors/</link>
            <pubDate>Wed, 21 Jan 2015 21:47:09 GMT</pubDate>
            <description><![CDATA[ As many are aware, CloudFlare launched Universal SSL several months ago. We saw lots of customers sign up and start using these new, free SSL certificates. For many customers that didn’t already have an SSL certificate, they were able to use “Flexible SSL”. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>As many are aware, CloudFlare launched <a href="https://support.google.com/webmasters/answer/6073543?utm_source=wmx_blog&amp;utm_medium=referral&amp;utm_campaign=tls_en_post">Universal SSL</a> several months ago. We saw lots of customers sign up and start using these new, <a href="https://www.cloudflare.com/application-services/products/ssl/">free SSL certificates</a>. For many customers that didn’t already have an SSL certificate, they were able to use “Flexible SSL”.</p><p>Flexible SSL creates a secure (HTTPS) connection between the website visitor and CloudFlare and then an in-secure (HTTP) connection between CloudFlare and the origin server. For any site using absolute links to assets (i.e. javascript, css, and image files), this can lead to a “Mixed Content” error.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6fogaeQLTAc6tj2BAMzJ0g/ea7d5d7f7ff94469267238d4875aae4f/Screen-Shot-2015-01-21-at-10-50-54-AM-5.png" />
            
            </figure>
    <div>
      <h4>Mixed Content = Mixed Protocol</h4>
      <a href="#mixed-content-mixed-protocol">
        
      </a>
    </div>
    <p>What is “Mixed Content”? This can be understood as mixed protocol. When the webpage is loaded over SSL (HTTPS protocol), most browsers expect all of the assets to be loaded over the same protocol. Some browsers will display an error about loading “insecure content” while others will just block the insecure content outright.</p><p>This error only applies to pages loaded over SSL, since the browser is working to make sure that secure pages only load equally secure assets.</p>
    <div>
      <h4>Wordpress Plugin Updates</h4>
      <a href="#wordpress-plugin-updates">
        
      </a>
    </div>
    <p>The latest version of the CloudFlare plugin for Wordpress works to resolve a lot of these errors by altering the protocol within the links to assets. Where currently your Wordpress site may link to your stylesheet like this:</p>
            <pre><code>http://www.example.com/wp/wp-content/themes/twentyfifteen/style.css?ver=4.1</code></pre>
            <p>We’ll remove the “http:” part to make this into a relative protocol:</p>
            <pre><code>//www.example.com/wp/wp-content/themes/twentyfifteen/style.css?ver=4.1</code></pre>
            <p>A further update to this rewriting doesn’t enable this rewriting for canonical URLs, since Google and other search engines expect this to be an absolute URL. Google also <a href="https://support.google.com/webmasters/answer/6073543?utm_source=wmx_blog&amp;utm_medium=referral&amp;utm_campaign=tls_en_post">recommends securing your site with SSL</a>, and being able to enable Flexible SSL is a great way to achieve this SEO boost!</p>
    <div>
      <h4>Relative Protocol</h4>
      <a href="#relative-protocol">
        
      </a>
    </div>
    <p>A relative protocol <code>//www.example.com</code> tells your browser to load the asset over the same protocol as the main page. If your site loads over HTTPS, then the browser will try to load the asset over HTTPS as well. (In other words, NOT mixed. Everything is over HTTPS!)</p><p>This approach has no negative side effects for customers who don’t enable SSL (or who have traffic visit over HTTP as well as HTTPS), since if the page is loaded over HTTP, the assets will be loaded on the same protocol.</p>
    <div>
      <h4>Best Practices using Wordpress and Flexible SSL</h4>
      <a href="#best-practices-using-wordpress-and-flexible-ssl">
        
      </a>
    </div>
    <p>Protocol rewriting is on by default in our current version of the Wordpress plugin, so you should be able to enable Flexible SSL on your account and have traffic go to <a href="https://www.yourdomain.com">https://www.yourdomain.com</a>.</p><p>CloudFlare recommends also adding a page rule for <a href="http://www.yourdomain.com">http://www.yourdomain.com</a>* that redirects all traffic to HTTPS (assuming that Wordpress is set up for the WWW subdomain and isn’t within a directory on your domain).</p><p>With these two changes we can secure all traffic to your Wordpress site between the customer and CloudFlare’s server.</p>
    <div>
      <h4>Limitations of Protocol Rewriting</h4>
      <a href="#limitations-of-protocol-rewriting">
        
      </a>
    </div>
    <p>While this improvement should allow many Wordpress users to enable Flexible SSL without any other changes to their website, there are a few items to consider:</p><p>If after upgrading to the latest version of the Wordpress plugin, you still get “Mixed Content” errors, it’s likely that a plugin you are using adds assets to the site though javascript. The ways and methods to do this vary greatly, so it’s not currently possible to catch all of these instances. Plugin developers are encouraged to link to assets relatively or use Wordpress’s built-in methods for adding assets to the page.</p><p>It’s also important to note the limitation of Flexible SSL. For websites that collect credit cards and other secure information, it’s important to secure this information from the customer all the way to your server, so we recommend using Full SSL and having an SSL certificate on your server because this also secures the traffic between CloudFlare and your origin.</p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[Mixed Content Errors]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">7h0xjOF9xXTYY9GdmqgUzy</guid>
            <dc:creator>David Fritsch</dc:creator>
        </item>
        <item>
            <title><![CDATA[Automatic protection for common web platforms]]></title>
            <link>https://blog.cloudflare.com/automatic-protection-for-common-web-platforms/</link>
            <pubDate>Tue, 14 Oct 2014 12:16:11 GMT</pubDate>
            <description><![CDATA[ If you are a CloudFlare Pro or above customer you enjoy the protection of the CloudFlare WAF. If you use one of the common web platforms, such as WordPress, Drupal, Plone, WHMCS, or Joomla, then it's worth checking if the relevant CloudFlare WAF ruleset is enabled. ]]></description>
            <content:encoded><![CDATA[ <p>If you are a CloudFlare Pro or above customer you enjoy the protection of the CloudFlare WAF. If you use one of the common web platforms, such as WordPress, Drupal, Plone, WHMCS, or Joomla, then it's worth checking if the relevant CloudFlare WAF ruleset is enabled.</p><p>That's because CloudFlare pushes updates to these rules automatically when new vulnerabilities are found. If you enable the relevant ruleset for your technology then you'll be protected the moment new rules are published.</p><p>For example, here's a screenshot of the WAF Settings for a customer who uses WordPress (but doesn't use Joomla). If CloudFlare pushes rules to the WordPress set then they'll be protected automatically.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/XbdmYi2KwAWfH5YGso6Wc/4f44b11c96b84a9f4cdfcd5b6873a322/Screen-Shot-2014-10-14-at-13-39-46.png" />
            
            </figure><p>Enabling a ruleset is simple. Just click the ON/OFF button and make sure it's set to ON.</p><p>Here's a customer with the Drupal ruleset disabled. Clicking the ON/OFF button would enable that ruleset and provide protection from existing vulnerabilities and automatic protection if new rules are deployed.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2W4Whn25WpufXxJfiThwIS/286dd849b12e6d66de8e3c1f7cc2da27/Screen-Shot-2014-10-14-at-13-42-48.png" />
            
            </figure><p>For common problems we've rolled out protection across the board. For example, we rolled out <a href="/staying-ahead-of-openssl-vulnerabilities/">Heartbleed protection</a> and <a href="/shellshock-protection-enabled-for-all-customers/">Shellshock</a> automatically, but for technology-specific updates it's best to enable the appropriate ruleset in the WAF Settings.</p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Drupal]]></category>
            <category><![CDATA[Joomla]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[Reliability]]></category>
            <category><![CDATA[WAF]]></category>
            <guid isPermaLink="false">50MDvmzqVyOjCuqTmerQAK</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Jetpack for WordPress: automatic protection]]></title>
            <link>https://blog.cloudflare.com/our-waf-is-keeping-wordpress-jetpack-on-track/</link>
            <pubDate>Thu, 10 Apr 2014 01:59:00 GMT</pubDate>
            <description><![CDATA[ As we've said before, lots of our users run WordPress on their websites and its popularity makes it a big target. So when a new vulnerability is discovered, acting quickly is prudent. ]]></description>
            <content:encoded><![CDATA[ <p>As we've said <a href="/wordpress-pingback-attacks-and-our-waf">before</a>, lots of our users run WordPress on their websites and its popularity makes it a big target. So when a new vulnerability is discovered, acting quickly is prudent.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6CQjKqntHcWuyaaEA33OyG/d0e5d42506426641a8008ab54470ff93/Screen_Shot_2014-04-10_at_18.11.59_1.png" />
            
            </figure><p><a href="http://jetpack.me">Jetpack</a> is an extremely popular plugin to provide self-hosted blogs with all of the <a href="http://jetpack.me/about/">additional functionality</a> that WordPress provide to sites hosted with their own hosted platform at WordPress.com.</p><p>Very recently, a serious security flaw in Jetpack was discovered. It has the potential to allow an attacker to complete actions on a blog without having to log in, such as posting. The WordPress team has written about the the problem <a href="http://jetpack.me/2014/04/10/jetpack-security-update/">here</a>.</p><p>This problem was assigned the CVE number <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0173">CVE-2014-0173</a> and is fixed in Jetpack 2.9.3 released today. Everyone using Jetpack on their WordPress site should update immediately.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2zziU8EltOqoW9poVrYqP0/994b07ab9fc48c2f9fe444f3f2e31df2/Screen_Shot_2014-04-10_at_18.45.40.png" />
            
            </figure><p>All CloudFlare customers who use WordPress are automatically protected against this bug. We rolled out a <a href="https://www.cloudflare.com/waf">Web Application Firewall</a> (WAF) rule that is automatically enabled for all customers (free or paid) to protect against this problem.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2VnZTWe4kyFTOTyLA3CkY5/576cace78b9832ad9ee1fc151f455df4/Screen_Shot_2014-04-10_at_18.15.25.png" />
            
            </figure><p>Customers using Jetpack should still upgrade immediately, but the WAF rule gives a little breathing space.</p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <guid isPermaLink="false">7xhD4xu7m7wxKWeDPxPBJt</guid>
            <dc:creator>Simon Moore</dc:creator>
        </item>
        <item>
            <title><![CDATA[WordPress Pingback Attacks and our WAF]]></title>
            <link>https://blog.cloudflare.com/wordpress-pingback-attacks-and-our-waf/</link>
            <pubDate>Tue, 11 Mar 2014 16:00:00 GMT</pubDate>
            <description><![CDATA[ At CloudFlare a lot of our customers use WordPress, that's why we have our own plugin, we hang out at WordCamp and we wrote a WordPress specific ruleset for our Web Application Firewall. ]]></description>
            <content:encoded><![CDATA[ <p>At CloudFlare a lot of our customers use WordPress, that's why we have our own <a href="http://WordPress.org/plugins/cloudflare">plugin</a>, we hang out at <a href="https://twitter.com/CloudFlare/status/424232493282107392">WordCamp</a> and we wrote a WordPress specific ruleset for our <a href="https://www.cloudflare.com/waf">Web Application Firewall</a>.</p><p>WordPress' ubiquity on the web can make it an ideal target for <a href="http://en.wikipedia.org/wiki/OSI_model#Layer_7:_application_layer">Layer 7</a> attacks, and its powerful features as a blogging platform can be demanding on small web and database servers, meaning Layer 7 attacks can be effective in making a WordPress server go offline using a relatively low number of requests.</p><p>Recently the folks at <a href="http://blog.sucuri.net/2014/03/more-than-162000-WordPress-sites-used-for-distributed-denial-of-service-attack.html">Sucuri</a> observed a large DDoS using WordPress' pingback mechanism. A <a href="http://en.wikipedia.org/wiki/Pingback">pingback</a> is a way of one website telling another that it has linked to their content. We’ve seen this attack in the past and already had WAF rules in place to block it.</p><p>WordPress exposes an <a href="http://en.wikipedia.org/wiki/XML-RPC#PHP">XMLRPC</a> endpoint - xmlrpc.php - which other sites can make POST requests to in a standard format to inform a blog that their content has been linked to. The message it sends contains the blog link they referred to, and the page on which they placed that link.</p><p>When WordPress receives a pingback, it makes a request back to the source page to check that the link is actually there. Attackers can use this mechanism to specify a genuine link on a WordPress site and an intended victim, which will trigger a HTTP request to the victim's site. You can think of this as a kind of HTTP Reflection attack, in that the attacker can send a relatively small request to an XMLRPC endpoint that supports pingbacks, and trigger a much larger amount of effort and response on the victim's server.</p><p>Fortunately, our WordPress WAF rule WP0001 "WordPress Pingback Blocker" will immediately stop your WordPress blog from being used for this type of pingback abuse. If you run WordPress, you may want to consider enabling this today.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1tbprIqovu6zSt0IYPfzkv/1f373113a25886b9e4df8eca83ff2ed6/cloudflare_waf_wordpress_ruleset_1.png" />
            
            </figure><p>You can find the “CloudFlare WordPress” ruleset under the CloudFlare Settings &gt; Security &gt; Manage WAF section, toggle the switch to turn the CloudFlare Wordpress ruleset on, and you’re all set.</p><p>For an added sting in the tail, the attack Sucuri observed also used a mutating query string when specifying a URL on which they had placed a link. This bogus mutating URL will neutralise most caches and means a server has to expend the effort of producing a page from scratch over and over again. Fortunately we also have CloudFlare WordPress rule 100000 "WordPress Numbers Botnet" which will block this type of behaviour.</p><p>So whether your blog is used to attack others or to be attacked itself, our WAF can help. For more information on our WAF <a href="https://www.cloudflare.com/waf">cloudflare.com/waf</a></p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Attacks]]></category>
            <guid isPermaLink="false">1u0EzGgqOoO0AlreSLiTB0</guid>
            <dc:creator>Simon Moore</dc:creator>
        </item>
        <item>
            <title><![CDATA[W3TC and WP Super Cache Vulnerability Discovered, We've Automatically Patched]]></title>
            <link>https://blog.cloudflare.com/w3tc-and-wp-super-cache-vulnerability-discove-17794/</link>
            <pubDate>Wed, 24 Apr 2013 22:36:00 GMT</pubDate>
            <description><![CDATA[ The team at the research firm Sucuri announced a serious vulnerability to W3TC and WP Super Cache this afternoon. (Update: it appears the vulnerability was first reported on WordPress.org about a month ago.) ]]></description>
            <content:encoded><![CDATA[ <p></p><p>The team at the research firm Sucuri <a href="http://www.reddit.com/r/netsec/comments/1czzyx/update_wp_super_cache_and_w3tc_immediately_remote/">announced a serious vulnerability</a> to W3TC and WP Super Cache this afternoon. (Update: it appears the <a href="http://wordpress.org/support/topic/pwn3d">vulnerability was first reported</a> on WordPress.org about a month ago.) The vulnerability allows remote PHP code to be executed locally on a server for anyone running either of the two most popular WordPress caching plugins. This is a serious vulnerability as it could allow an attacker to execute code on your server.</p><p>Here are the versions of each plugin that are vulnerable:</p><ul><li><p><b>W3 Total Cache</b> (version 0.9.2.8 and below are vulnerable, version 0.9.2.9 and up are not vulnerable) / <a href="http://wordpress.org/extend/plugins/w3-total-cache/changelog/">upgrade here</a></p></li><li><p><b>WP Super Cache</b> (version 1.2 and below are vulnerable, version 1.3.x and up are not vulnerable) / <a href="http://wordpress.org/extend/plugins/wp-super-cache/changelog/">upgrade here</a></p></li></ul><p>As a precaution, CloudFlare has applied a rule to our network which protects against this specific vulnerability in both plugins. The protection is applied for all CloudFlare accounts automatically, even free accounts. You do not need to do anything to enable the protection.</p><p>Even with this protection in place, if you are running either of these plugins you should upgrade immediately (<a href="http://wordpress.org/extend/plugins/w3-total-cache/changelog/">W3TC Upgrade</a> / <a href="http://wordpress.org/extend/plugins/wp-super-cache/changelog/">WP Super Cache Upgrade</a>). The vulnerability is serious enough that we recommend you disable the plugins until you have completed an upgrade. If you're not already a CloudFlare customer, you can <a href="https://www.cloudflare.com/sign-up">signup for free to get protection immediately</a>.</p>
    <div>
      <h4>Technical Details</h4>
      <a href="#technical-details">
        
      </a>
    </div>
    <p>The attack takes advantage of several functions in these plugins including: mfunc, mclude, and dynamic-cached-content. An attacker can execute a PHP command running on the server by pasting a comment to a WordPress blog running a vulnerable version of W3 Total Cache or WP Super Cache. For example, if you are running a vulnerable version of the plugins, the following will result in your current PHP version being printed in the comment:</p><p>While this is harmless, the same mfunc call in either plugin can run other arbitrary commands on your server. This could be used to gain access to the server, execute arbitrary database commands, or remotely install malware. Again, this is a very severe vulnerability and all W3TC and W3 Super Cache users should upgrade immediately (<a href="http://wordpress.org/extend/plugins/w3-total-cache/changelog/">W3TC Upgrade</a> / <a href="http://wordpress.org/extend/plugins/wp-super-cache/changelog/">WP Super Cache Upgrade</a>).</p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <guid isPermaLink="false">bLyaYA5AtPnYkpzSAHjen</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[Patching the Internet in Realtime: Fixing the Current WordPress Brute Force Attack]]></title>
            <link>https://blog.cloudflare.com/patching-the-internet-fixing-the-wordpress-br/</link>
            <pubDate>Thu, 11 Apr 2013 21:23:00 GMT</pubDate>
            <description><![CDATA[ There is currently a significant attack being launched at a large number of WordPress blogs across the Internet. The attacker is brute force attacking the WordPress administrative portals, using the username "admin" and trying thousands of passwords.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>There is currently a significant attack being launched at a large number of WordPress blogs across the Internet. The attacker is brute force attacking the WordPress administrative portals, using the username "admin" and trying thousands of passwords. It appears a botnet is being used to launch the attack and more than tens of thousands of unique IP addresses have been recorded attempting to hack WordPress installs.</p><p>One of the concerns of an attack like this is that the attacker is using a relatively weak botnet of home PCs in order to build a much larger botnet of beefy servers in preparation for a future attack. These larger machines can cause much more damage in DDoS attacks because the servers have large network connections and are capable of generating significant amounts of traffic. This is a similar tactic that was used to <a href="http://www.informationweek.com/security/attacks/bank-attackers-used-php-websites-as-laun/240144413">build the so-called itsoknoproblembro/Brobot botnet</a> which, in the Fall of 2012, was behind the large attacks on US financial institutions.</p>
    <div>
      <h3>Patching the Internet</h3>
      <a href="#patching-the-internet">
        
      </a>
    </div>
    <p>We just pushed a rule out through CloudFlare's WAF that detects the signature of the attack and stops it. Rather than limiting this to only paying customers, CloudFlare is rolling it out the fix to all our customers automatically, including customers on our free plan. If you are a WordPress user and you are using CloudFlare, you are now protected from this latest brute force attack.</p><p>Because CloudFlare sits in front of a significant portion of web requests we have the opportunity to, literally, patch Internet vulnerabilities in realtime. We will be providing information about the attack back to partners who are interested in hardening their internal defenses for customers who are not yet on CloudFlare.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1Qxf0zOlMIZlcmsHkeGr97/8f5f667b97871997b9a4f7c9142d03f6/internet_patch.png.scaled500.png" />
            
            </figure><p>If you are running a WordPress blog and want to ensure you are protected from this attack, you can <a href="https://www.cloudflare.com/sign-up">sign up for CloudFlare's free plan</a> and the protection is automatic. We'll continue to monitor the details of the attack and publish details about what we learn.</p> ]]></content:encoded>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[Reliability]]></category>
            <guid isPermaLink="false">Ni9NFv4fKxW0ITtaWqIRo</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[WordPress London Meetup January 2013]]></title>
            <link>https://blog.cloudflare.com/wordpress-london-meetup-january-2013/</link>
            <pubDate>Fri, 18 Jan 2013 09:23:00 GMT</pubDate>
            <description><![CDATA[ Last night I gave a short presentation about how to use CloudFlare with WordPress sites to about 60 people attending the WordPress London Meetup. CloudFlare was happy to be sponsor of the event providing drinks, beers and lots and lots of pizza. The meetup was held at the Google Campus. ]]></description>
            <content:encoded><![CDATA[ <p>Last night I gave a short presentation about how to use CloudFlare with WordPress sites to about 60 people attending the <a href="http://www.meetup.com/London-WordPress/events/81910532/">WordPress London Meetup</a>. CloudFlare was happy to be sponsor of the event providing drinks, beers and lots and lots of pizza. The meetup was held at the <a href="http://www.campuslondon.com">Google Campus</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2bdYQMglHyT6gy21JAG1Q/9c2bd44b605eb215f9d3e5ce99a3cf0f/IMG_4277.JPG.scaled500.jpg" />
            
            </figure><p>There were two talks: I was preceded by designer <a href="http://laurakalbag.com/">Laura Kalbag</a> who talked about designing icons for WordPress sites. This is something that she made look incredibly easy using a tool called <a href="http://www.bohemiancoding.com/sketch/">Sketch</a>. I suspect that however good Sketch is, I'd end up drawing icons that looked awful!</p><p>My talk was about using WordPress and CloudFlare together. CloudFlare has a ton of features and I highlighted some that are of great interest to WordPress users including the <a href="http://wordpress.org/extend/plugins/cloudflare/">CloudFlare WordPress Plugin</a> and our integration with <a href="/w3-total-cache-w3tc-total-cloudflare-integrat">W3TC</a>.</p><p>The other features that people found most interesting were:</p><ol><li><p><a href="/always-online-v2">Always Online</a>: CloudFlare crawls the WordPress site and keeps a copy in a special cache. If the original site goes down CloudFlare serves up the most recent version from the crawler cache with a banner indicating that it is old content. This helps keep sites online when things go badly wrong.</p></li><li><p><a href="/an-all-new-and-improved-autominify">Auto-minify</a>: many WordPress sites have large amount of HTML, <a href="https://www.cloudflare.com/learning/performance/how-to-minify-css">CSS</a>, and JavaScript (especially if they use lots of plugins). Auto-minify helps shrink those resources so that sites are delivered faster to web browsers.</p></li><li><p><a href="/how-cloudflare-rocket-loader-redefines-the-modern-cdn/">Rocket Loader</a>: a tool that reorganizes the loading of resources such as CSS and JavaScript to that they are downloaded to web browsers quickly by bundling them.</p></li><li><p>A new, unannounced feature that I'm calling "Help, I've gone viral!" which allows any web site owner to instantly tell CloudFlare to start completely caching a URL (overriding any caching headers set by the site) to cope with load. With this if a URL goes viral and is overloading a WordPress site it's possible to just paste in its URL and ask CloudFlare to take the load of that page. We'll be writing more about that feature when it's released.</p></li></ol><p>And, of course, other CloudFlare features like <a href="/easiest-ssl-ever-now-included-automatically-w">Easy SSL</a>, <a href="/spdy-now-one-click-simple-for-any-website">SPDY</a>, and <a href="/introducing-cloudflares-automatic-ipv6-gatewa">IPv6</a> help everyone get the latest technology onto their site quickly.</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Meetups]]></category>
            <category><![CDATA[WordPress]]></category>
            <category><![CDATA[Always Online]]></category>
            <category><![CDATA[Rocket Loader]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[United Kingdom]]></category>
            <category><![CDATA[Community]]></category>
            <guid isPermaLink="false">5Pz6V8TXfn781DSko28qnf</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[SEO and your website]]></title>
            <link>https://blog.cloudflare.com/seo-and-your-website/</link>
            <pubDate>Mon, 19 Nov 2012 21:26:00 GMT</pubDate>
            <description><![CDATA[ We get a lot of questions from our customers about CloudFlare and how we impact SEO. So when SEO.com signed up for CloudFlare, I thought it would be a great opportunity to talk to an expert to get the scoop on all things SEO.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p><i>We get a lot of questions from our customers about CloudFlare and how we impact SEO. So when </i><a href="http://www.seo.com/"><i>SEO.com</i></a><i> signed up for CloudFlare, I thought it would be a great opportunity to talk to an expert to get the scoop on all things SEO. I was fortunate enough to connect with </i><a href="https://twitter.com/DerekPerkins"><i>Derek Perkins</i></a><i>, Vice President of Technology at SEO.com. With more than 12 years of industry experience, Derek provided his insight on SEO in general, debunked some of the myths out there, and gave us his take on what really works, and what doesn't, when it comes to SEO and your site.</i></p>
    <div>
      <h4>CF - What are the top three tips you can offer for website owners looking to improve their SEO?</h4>
      <a href="#cf-what-are-the-top-three-tips-you-can-offer-for-website-owners-looking-to-improve-their-seo">
        
      </a>
    </div>
    <p>DP - Step one - use <a href="http://wordpress.com/">WordPress</a> and WordPress SEO. For most website owners, a Content Management System is key. The WordPress platform would be my first choice, you don't have to deal with structure of a Wordpress site to make sure it's easily searchable and findable. WordPress ranks high, especially if you activate <a href="http://yoast.com/wordpress/seo/">WordPress SEO by Yoast</a>. A combination of those two alone put you a long way ahead of where smaller business are. Correct structure is a good thing.</p><p>Step two - Focus on great content. Sporadic posting is never going to yield a tangible output. The more Google changes their algorithms, the more likely you will get ranked lower if you're not posting often. Just posting frequently however isn't enough. Content has always risen to the top of rankings, and as search engines mature, they are continuing to increase the signal to noise ratio. Posting great content regularly is the key to SEO success.</p><p>Step three - find good website hosting that will be elastic. Great content that gets picked up on TechCrunch, Digg, Reddit - any viral site - is going to see heavy spikes in traffic. If you're on a cheap hosting plan you often won't be able to scale to meet demands.</p><p>Actually, one of the first things I do is recommend CloudFlare. I love the CDN and scalability, it takes load off of the server so you don' have to worry so much about load spikes.</p>
    <div>
      <h4>CF - What are some of the misperceptions with SEO?</h4>
      <a href="#cf-what-are-some-of-the-misperceptions-with-seo">
        
      </a>
    </div>
    <p>DP - A big misperception about SEO is the idea that you have to somehow change your writing or write things that are for search engines instead of humans. That's not the case. A lot of people also say you have to have unnaturally high keyword density and that's the only way you're going to rank. That's not good, it's harmful. Google sees that as if you're writing it specifically for SEO. Search engines try to read content as if they were human. If the content doesn't flow well or read well for a human, chances are it's not going to read well for a search engine or spider.</p><p>SEO is all about having good content. Write content you and others would like to read. It is more likely be shared socially, bringing more people to your site, and more people will link back to your site, growing your online presence.</p><p>When people think of SEO they tend to focus on the 10 percent that's the little tweaks that SEO companies can do for you, whereas the bulk of the value comes from writing good content.</p>
    <div>
      <h4>CF - Web properties care a lot about SEO, what are some good resources for site owners looking to better their SEO rank?</h4>
      <a href="#cf-web-properties-care-a-lot-about-seo-what-are-some-good-resources-for-site-owners-looking-to-better-their-seo-rank">
        
      </a>
    </div>
    <p>DP - There are a number of places on the web that have good SEO forums. We have a link on our own site,<a href="http://www.seo.com/forums"></a><a href="http://www.SEO.com/forums">www.SEO.com/forums</a>, that links to a number of the best forums out there. Another great resource is <a href="http://www.seomoz.org/beginners-guide-to-seo">SEOmoz</a>, it's a great place for website owners to start.</p>
    <div>
      <h4>CF - What is one thing site owners should be doing to improve their SEO, but probably aren't?</h4>
      <a href="#cf-what-is-one-thing-site-owners-should-be-doing-to-improve-their-seo-but-probably-arent">
        
      </a>
    </div>
    <p>DP - Number one thing that people don't do - they don't have any sort of targets. Content is king, but a lot of it is knowing what specificcontent is going to be most valuable to them. You can write about two different things that are both interesting, exciting and relevant to your audience, but one is relevant to maybe 10 searches a month, whereas one is relevant to 10,000 searches a month. Having an idea of what pages or blog posts or keywords you're targeting with each will help you tailor the content.</p>
    <div>
      <h4>CF - What are some of the things site owners do that might negatively impact SEO?</h4>
      <a href="#cf-what-are-some-of-the-things-site-owners-do-that-might-negatively-impact-seo">
        
      </a>
    </div>
    <p>DP - Picking the wrong page titles and/or having a malformed HTML structure. There's a lot of SEO weight on title and header tags, you need to have your page title similar to whatever is in your H1 tag. A lot of site owners out there don't have header tags or have them set-up correctly. Even if they have a good title, the title might not be in the HTML header tag. The title and headers help both search engines and more importantly humans identify the focus of the page.</p>
    <div>
      <h4>CF - How has your industry changed in the last five years?</h4>
      <a href="#cf-how-has-your-industry-changed-in-the-last-five-years">
        
      </a>
    </div>
    <p>DP - I think SEO has a bit of a stigma because of old tactics that people used to use. You used to be able to immediately rank for SEO by using tricks like white text on a white background and various other tactics to gain the system. Even just recently Google has released things like Penguin, making it harder and harder to game the system. It changes how SEO agencies function, shifting the focus from link building to strategic content driven approaches. That has driven a proliferation of socially shareable content like infographics.</p>
    <div>
      <h4>CF - You've seen the Google vs Bing commercial search challenge. The commercial claims people choose Bing 2 to 1 over Google. Do you think that's right? What are your thoughts?</h4>
      <a href="#cf-youve-seen-the-google-vs-bing-commercial-search-challenge-the-commercial-claims-people-choose-bing-2-to-1-over-google-do-you-think-thats-right-what-are-your-thoughts">
        
      </a>
    </div>
    <p>DP - Personally, I occasionally use Bing, but I tend to go back to Google. I took the test myself and Bing won 3 to 2, but I felt like the stripped down result pages weren't a perfect test.</p>
    <div>
      <h4>CF - Google, Yahoo! and Bing are huge competitors in the search space. What are your thoughts on each? Do any of them stand out as being front runners in the near future?</h4>
      <a href="#cf-google-yahoo-and-bing-are-huge-competitors-in-the-search-space-what-are-your-thoughts-on-each-do-any-of-them-stand-out-as-being-front-runners-in-the-near-future">
        
      </a>
    </div>
    <p>DP - Bing has been gaining ground, Yahoo!'s results are powered by Microsoft, so Bing and Yahoo! will both show same results. The big two are definitely Google and Bing. You can't ignore Bing when you're tracking rankings, but they are definitely playing second fiddle to Google at this point.</p><p>For a long time Google has provided the best search rankings. Whether or not Bing has closed the gap on search, they have an uphill battle. People are used to Google, it's becoming part of the English language. I doubt that anyone outside of Microsoft headquarters has ever said "I don't know the answer, let me go Bing it."</p>
    <div>
      <h4>CloudFlare...in his own words</h4>
      <a href="#cloudflare-in-his-own-words">
        
      </a>
    </div>
    <p>I've been using CloudFlare for over a year now. I had a personal website called<a href="http://soccerreviews.com/">soccerreviews.com</a>. I built it up to have significant traffic and I was really having server load issues, in addition to having been hacked twice. Because of that, security and scalability was very important to me.</p><p>I tried CloudFlare on that site and I now have it on 30 other sites. I have yet to have any of those sites compromised, which has been fantastic.</p><p>Once I joined SEO.com, I put us on CloudFlare. One feature I really like about CloudFlare is Rocket Loader. It combines all my javascript files and speeds them up, and they aren't all being downloaded separately, decreasing download time.</p><p>As for the impact to SEO, bounce rate plays a very important role in how Google does their rankings - they see that as a human factor in SEO. If someone immediately jumps back to Google, it's obviously not a good human source. A fast site that's always online is sure to help your rankings with lower bounce rates, and having CloudFlare helps to make this possible.</p> ]]></content:encoded>
            <category><![CDATA[SEO]]></category>
            <category><![CDATA[Customers]]></category>
            <category><![CDATA[WordPress]]></category>
            <guid isPermaLink="false">2TwADmuL15zRfv0L5BsFep</guid>
            <dc:creator>Kristin Tarr</dc:creator>
        </item>
    </channel>
</rss>