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.
- 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
You can install the Cloudflare WP Plugin through the WP-Admin panel.
- Plugins -> Add New
- Search for “Cloudflare”
- Install and Activate the Cloudflare Plugin
Step 2: Activate the Plugin With Cloudflare Email and API Key
- Login To Your Cloudflare Account Or Create An Account
- Go To the API Tokens Area (Top Right Corner -> My Account -> API Tokens -> Global API Key
- Copy the API Key
- 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
The results of those three tests are below.
|Dallas, TX||Hong Kong, China||Sydney, Australia|
|TTFB (Before)||168.4 milliseconds||362 milliseconds||222 milliseconds|
|TTFB (After)||146.9 milliseconds||187.3 milliseconds||194 milliseconds|
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.
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.