Using a Fastly plugin in your CMS

Content management software is a common choice as an application platform on which to run a website, and we maintain plugins to help you make the most of Fastly via direct integration with your chosen CMS tool.

Drupal

Our Drupal Module automatically purges content from the Fastly cache when it is updated or deleted in Drupal. This enables content to be cached at the edge for longer, whilst never becoming out of date. The 8.x module uses Drupal core’s CacheTagsInvalidatorInterface to purge specific cache tags allowing for all content associated with the cache tag to be invalidated.

Magento

We maintain a richly featured extension for Magento 2, which is also automatically available to all users of the Magento Commerce Cloud. In common with our other CMS plugins, the Magento extension will purge the Fastly cache when content changes, allowing efficient edge caching and ensuring that content displayed to end users is always up to date. In addition, the Fastly control panel within the Magento admin interface also provides convenient access to many other Fastly features, such as blocking unwanted traffic, redirects, image optimization, and rate limiting, among many others.

The preferred way to install the Magento extension is via Composer, the PHP dependency manager:

$ composer config repositories.fastly-magento2 git "https://github.com/fastly/fastly-magento2.git"
$ composer require fastly/magento2

Once the installation is completed, enable the Fastly CDN module:

$ bin/magento module:enable Fastly_Cdn
$ bin/magento setup:upgrade
$ bin/magento cache:clean

You can find more information on other installation methods, configuration, and usage of the module in the repo documentation.

Wordpress

Our official Fastly plugin automatically purges content from Fastly when it is updated in Wordpress - including posts, pages, and taxonomies. It also adds a Fastly admin dashboard to the Wordpress admin web interface, with options for controlling cache durations, and enabling other Fastly features such as image optimization, redirects and blocking of unwanted traffic.

The plugin is installed in the same way as most other Wordpress plugins - either by copying the files into the source tree of your Wordpress install, or by using the plugin directory within the Wordpress admin web interface.

User contributed notes

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)