menu_book Navigation menu

Updates

Automated Version Monitoring

Pragma CMS checks for updates automatically in the background to avoid slowing down the Administration panel.

This is powered by a dedicated Cron Job (scripts/cron/check_updates.php) configured to run twice a day. The job securely queries the Pragma API (CMS_API_URL/core). If a new version is detected, the UpdateManager caches this information and automatically sends an email notification to the platform administrator.

To prevent excessive API calls and optimize performance, the update status is cached locally for 12 hours (storage/cache/update_status.json).

The 7-Step Deployment Pipeline

When an administrator clicks the "Update" button in the Platform UI, Pragma CMS executes a highly secure, 7-step automated deployment pipeline. This ensures a zero-downtime update process without breaking active client sessions.

  1. Maintenance Mode: A temporary maintenance.flag file is generated. The router intercepts all public traffic and serves a 503 Service Unavailable page, while keeping logged-in administrators active so they can monitor the process.
  2. Encrypted Download: The system authenticates with the central API using the server's LICENSE_KEY and downloads the new CMS Core ZIP file into a temporary storage folder.
  3. Integrity Verification: Before touching any executable code, the CMS calculates the sha256 hash of the downloaded ZIP and compares it against the official API signature. If the hash mismatches, the process aborts safely.
  4. Extraction (Core Overriding): The new core is extracted into a dedicated versioned directory (/cms-versions/[new-version]).
  5. Assets Publishing: Public assets (CSS, JS, Fonts) belonging to the new core are synchronized to the PUBLIC_DIR so the browser can cache the new filenames.
  6. Platform & Client Deployment: The master configuration (cms_version.php) is updated to point to the new core folder. The Auto-Update engine is then triggered to run database migrations for the platform and all hosted client sites.
  7. Cleanup: The maintenance flag is removed, temporary ZIP files are deleted, and system caches (Twig, Routes) are forcibly cleared.