Set Up Cloudflare’s Automatic Platform Optimization Feature

Automatic Platform Optimization (APO) is a new feature from Cloudflare that allows you to cache more than just static content (JavaScript and CSS). It allows you to cache HTML and serve it to your website’s visitors from Cloudflare’s edge servers.

This feature was previously only available through Cloudflare Worker’s or the page rule system. The problem with this set up was it typically caused more of a headache than what it was worth.

Benefits

  • Reducing Time to First Byte (TTFB)
  • Improving Overall Performance
  • Faster User Experience for International Users
  • Reduces Server Load to Virtually Zero By Serving Content via the Edge
  • Optimizes Google Fonts

Set Up Automatic Platform Optimization (Two Options!)

There are two ways to set up Automatic Platform Optimization. We will only cover the first option in this tutorial. If you’d like to set it up using the second option, which is not recommended, please consult the Cloudflare documentation.

Option 1: Set up APO With the Cloudflare WP Plugin
Option 2: Set Up APO Without the Cloudflare WP Plugin (Not Recommended)

Step 1: Install the Cloudflare WP Plugin

Automatic Platform Optimization

You can install the Cloudflare WP Plugin through the WP-Admin panel.

  1. Plugins -> Add New
  2. Search for “Cloudflare”
  3. Install and Activate the Cloudflare Plugin
Step 2: Activate the Plugin With Cloudflare Email and API Key
Automatic Platform Optimization
  1. Login To Your Cloudflare Account Or Create An Account
  2. Go To the API Tokens Area (Top Right Corner -> My Account -> API Tokens -> Global API Key
  3. Copy the API Key
  4. Login Via the Cloudflare WP Plugin with Email and API Key
Step 3: Activate the Automatic Platform Optimization Feature

You can then activate the APO feature from the Home tab. This feature can be toggled on/off from Cloudflare or the Cloudflare WP Plugin dashboard.

Note: If you are on the free version of Cloudflare, the Automatic Platform Optimization (APO) feature is not included. If you utilize Cloudflare Free, the APO add-on is $5/month per website. APO is included, for free, in the Pro, Business, and Enterprise level plans.

Real World Testing and Server Response Times with Cloudflare APO

I tested my website Daily Driver Tips on GTmetrix from Dallas, TX, Hong Kong, China, and Sydney Australia before and after setting up Cloudflare’s Automatic Platform Optimization feature.

The results of those three tests are below.

Dallas, TXHong Kong, ChinaSydney, Australia
TTFB (Before)168.4 milliseconds362 milliseconds222 milliseconds
TTFB (After)146.9 milliseconds187.3 milliseconds194 milliseconds
Results from testing the server response time on https://dailydrivertips.com/ before and after setting up Cloudflare’s APO feature.

Daily Driver Tips is hosted on a fast Cloudways server located in Dallas and the server response time was reduced by around 20 milliseconds with the addition of Cloudflare’s Automated Platform Optimization (APO) feature. That’s a performance win in my book and I have no complaints.

The same goes for the global results from Hong Kong and Sydney. The server response times for both locations are very similar to what the tests in Dallas returned where the server is located. I have no complaints.

These results would be similar for virtually any location. I often have Australian clients with websites that are hosted with Siteground on a server in Singapore. This APO feature would greatly help reduce the server response time.

Closing Thoughts

I feel like this is very similar to the old Cloudflare Worker’s script, but takes the work out of having to set it up. Reducing the server response time for international users is not a bad thing.

There’s not a lot of good ways to do this and you could do so with the Cloudflare Worker’s script, but it required quite a bit of technical knowledge and you had to pay extra for the Worker’s scripts. This can get expensive depending on how many you scripts you needed, how many websites you were running, and the number of audience members using them.

There was also the page rule method, but I never felt like it was worth it unless you were on the business plan (or higher!). In the end, it’d cause more headaches than what it was worth.

The Automatic Platform Optimization (APO) feature does not fix the consequences of being on a slow host. GoDaddy Business Hosting is a common example of a slow host with slow response times. Utilizing the APO feature on a slow host will not allow you to have a fast response time. If you’re website’s host has terrible response times or your users are missing the Cloudflare cache, those issues are still going to occur. You’re better off switching to a faster host like Kinsta, WP Engine, Cloudways, or Siteground and then implementing the APO feature to further reduce the server response time.

Keep in mind also that Cloudflare offers a suite of security and anti-DDoS features to help protect your WordPress website. In addition to the performance-related features such as the APO that we covered above.

scott hartley

About the author

Scott is a web performance geek, lover of all things coffee, and avid video game player. His WordPress work delves into web performance, web security, and SEO.

Leave a Comment