Cloudflare Pro follows the standard Plesk extension layout.
meta.xml: Plesk extension metadata.htdocs/index.php: Plesk entrypoint that bootspm_Application.htdocs/public/assets: compiled React and Plesk UI Library bundle.htdocs/css: small extension-specific CSS.plib/controllers/IndexController.php: Zend controller actions and JSON endpoints.plib/views/scripts/index/index.phtml: host page that passes server data into the frontend.plib/hooks: Plesk navigation, custom button, and permission hooks.plib/library: repositories and Cloudflare/Plesk DNS services.plib/scripts: install and uninstall lifecycle scripts.src/tokens.jsx: React UI source.packaging/build.sh: repeatable package builder for local use and GitHub runners.
The extension stores data in SQLite at the Plesk module var directory:
cloudflare-pro.sqlite
Tables are initialized by repository classes:
tokens: per-user Cloudflare token metadata and encrypted token values.domain_links: matched Plesk domain and Cloudflare zone rows.settings: one JSON payload row per user.api_logs: Cloudflare API request/response audit logs.sync_jobs: persisted background sync job progress.
The database is removed by plib/scripts/pre-uninstall.php.
- Plesk loads
htdocs/index.php. pm_Applicationroutes intoIndexController.- Controller actions collect Plesk data, Cloudflare data, and JSON endpoint URLs.
index.phtmlinjects bootstrapped data and loadstokens.js.- React renders the Plesk UI Library interface.
- Mutations use controller JSON actions and Plesk forgery-protected POST requests.
- Tokens are validated with
/user/tokens/verify. - Zones are discovered with
/zones. - DNS records are read from Plesk through
pm_Domainandpm_Dns_Zone. - Cloudflare DNS records are read from
/zones/{zone_id}/dns_records. - Export and sync create or patch matching Cloudflare records.
- Import writes Cloudflare records into Plesk DNS.
- Background jobs process records in small batches and store progress in SQLite.
Modules_CloudflarePro_EventListener receives Plesk events, filters DNS/domain/subdomain events, extracts the host name, finds linked Cloudflare zones, and calls CloudflarePro_DomainSyncService::autoSyncHost().
When delete cleanup is enabled, autosync deletes only concrete child hostnames from Cloudflare. Ambiguous apex events are skipped to avoid removing a full zone after a subdomain delete. If create_www_for_subdomains is enabled, the matching www.<subdomain> companion record is cleaned up with the deleted subdomain.
Autosync only runs when:
- the user setting
enable_autosyncis enabled - the linked domain row has
auto_syncenabled - the event host belongs to a linked Cloudflare zone
plib/hooks/Permissions.php registers Cloudflare Pro access. Navigation and custom buttons are shown only when CloudflarePro_Permissions::hasAccess() passes for the current user context.