If you are utilizing a Fastly CDN in conjunction with your Platform.sh project that employs WordPress, the Fastly team has developed a WordPress plugin that facilitates the integration of your application with Fastly services. This plugin is crucial for ensuring that the WordPress application is configured correctly to avoid caching authenticated users or any requests directed to the WordPress backend. Additionally, the plugin allows for certain settings to be adjusted within the WordPress administration interface without the necessity of logging into the Fastly Dashboard.
For managed Fastly CDN, access to the Fastly dashboard is not available.
It is important to note that the Fastly WordPress Plugin stores the Fastly service connections within the WordPress `wp-options` table, and currently, overriding these credentials through Environment Variables or an environment file (.env) is not feasible. If you perform an environment data synchronization or import your production database into your staging environment, you may inadvertently configure your Fastly credentials incorrectly, resulting in the absence of updated content, as the cached objects on Fastly will not be purged from the appropriate service.
We are presently awaiting the implementation of PR-103, which aims to enable the use of environment variables for setting the correct Fastly credentials.
You can verify your current environment's Fastly general connection settings by executing the following SQL query.
select * from wp_options where option_name = "fastly-settings-general";
Currently, the Fastly event history can only be accessed through the Fastly API.
FASTLY_SERVICE_ID=<FASTLY_SERVICE_ID>
curl -sH "Fastly-Key: $FASTLY_API_TOKEN" -X GET "https://api.fastly.com/events?filter\[service_id\]=${FASTLY_SERVICE_ID}&page\[size\]=100" | jq -j -r '.data[] | "ID: ", .id, " Date: ", .attributes.created_at, " Type: ", .attributes.event_type, " Description:", .attributes.description, "\n"'
If you observe that your WordPress content is not being purged, it is advisable to verify that your Fastly service credentials are accurate.