Activate the Cloudflare WordPress plugin
For users on the free plan, be sure to purchase APO before installing the WordPress plugin. For users on a Pro plan or higher, continue to Install and activate the Cloudflare WordPress plugin.
Purchase APO
- Log into the Cloudflare dashboard.
- Select your account and zone.
- Go to Speed > Optimization > Content Optimization.
- For Automatic Platform Optimization for WordPress, select Purchase.
- Enter your payment information and select Confirm payment.
Install and activate the Cloudflare WordPress plugin
The easiest way to begin using APO is directly from Cloudflare’s WordPress plugin. Before you can use APO, you must first install and activate the plugin and then activate APO.
- Navigate and log in to your WordPress account.
- Select Plugins > Add new.
- In the search field, enter
Cloudflare
. - Locate the Cloudflare plugin and select Install now.
- After the plugin finishes installing, select Activate. The Cloudflare plugin now displays in your Plugins list.
Activate APO
To create the connection between WordPress and Cloudflare, you will create an API token from your Cloudflare dashboard and add it to WordPress. To set up APO on a subdomain, refer to Subdomains and subdirectories.
Create the API token from Cloudflare
- Open your Cloudflare dashboard.
- Select My Profile from the top of the page.
- Select API Tokens > Create Token.
- Locate WordPress from the list and select Use template.
- Select Continue to summary at the bottom of the page.
- On the WordPress API token summary page, select Create Token. Your API token displays.
- Select the Copy button to copy your token. You will need to paste the token in the next section.
Add your API token to WordPress
- Open your WordPress account and navigate to Plugins.
- Locate the Cloudflare plugin and select Settings.
- Select the option to sign in with an existing account.
- Enter your email address and paste the token you copied in Step 5 of Create the API token from Cloudflare.
- Select Save API Credentials.
- For Apply Recommended Cloudflare Settings for WordPress, select Apply.
- For Automatic Platform Optimization, switch the toggle to On to enable APO.
To verify APO is working, see Verify APO works.