Drupal module tutorial
Install Help4 CDN for Drupal
The module connects Drupal's site identity and cache tags to Help4 CDN, queues edge invalidation after supported entity changes, and provides site-scoped cache, scan, WAF, bot, header, and access controls.
Initial release: install on staging first, take a tested Drupal backup, and confirm the site is on Drupal 10.3 or Drupal 11 before production use.
How the module works
Drupal entityA supported public entity is saved, updated, deleted, or translated.
Cache tagsDrupal invalidates the entity and entity-list cache tags immediately.
Purge queueA bounded site-scoped Help4 purge item is queued so the content save does not wait on network I/O.
Cron workerDrupal cron sends the selected-path or domain request and records errors in Drupal logging.
Install and enable
- Back up Drupal.
Take current database and file backups and confirm the recovery procedure. - Download and verify the ZIP.
Comparehelp4-cdn-drupal-0.1.0.zipwith the published SHA-256 manifest. - Extract to the custom module directory.
Place the resultinghelp4_cdndirectory under the Drupal web root atmodules/custom/help4_cdnorweb/modules/custom/help4_cdn. - Enable Help4 CDN.
UseExtendin Drupal administration or rundrush en help4_cdn -yfrom the correct site root. - Grant the dedicated permission.
GiveAdminister Help4 CDNonly to trusted administrator roles. - Open the settings form.
Go toConfiguration,Web services,Help4 CDN, or open/admin/config/services/help4-cdn.
unzip help4-cdn-drupal-0.1.0.zip -d web/modules/custom
drush en help4_cdn -y
drush cr
Connect the site
- Enter the tenant API key and secret.
Use the private Help4 service handoff. Use a legacy token only when Help4 operations specifically requires it. - Save configuration.
API credentials and the Help4 site ID are stored in Drupal State API, so they are not exported with normal configuration synchronization. - Select Synchronize site.
The module checks the domain entitlement, discovers or registers its Help4 site, stores runtime state, and sends a heartbeat. - Confirm site ID, plan, and license.
Requested policy remains subject to the registered Help4 plan and current DNS/proxy validation. - Run Drupal cron.
Automatic Help4 invalidation uses the Drupal queue worker. Ensure the production cron schedule runs reliably.
Blank credential fields preserve stored values. Use the explicit Clear stored credentials control only when rotating or decommissioning the connection.
Verify the installation
- The form shows a Help4 site ID.
- The reported plan and license are expected.
- Trusted roles have the dedicated permission.
- Untrusted roles cannot open the form.
- A selected-path purge is accepted.
- Drupal cron processes the purge queue.
- A public node still renders correctly.
- Login and administration remain private.
drush cron
drush queue:run help4_cdn_purge
curl -sSI https://example.com/
Next: read the Drupal cache and queue tutorial before enabling broader proxy or WAF settings.
Update or remove
Replace the module directory with a verified newer release while Drupal is in a controlled maintenance/deployment window, then run database updates and rebuild caches when required by the release notes. Disable and uninstall the module before deleting its directory.
drush updb -y
drush cr
The update metadata is published at
/downloads/help4-cdn-drupal-update.xml. Site maintainers should still follow the deployment policy used for other custom modules.