General Configuration (Bootstrap & Globals)
In Pragma CMS, initialization is extremely fast. Instead of relying on slow, runtime .env parsers, the system boots through a strict sequence of native PHP includes (index.php → bootstrap.php → config.php).
During this phase, the CMS defines critical System Constants and loads the Global Site Settings directly from the database into the $site object.
1. System Constants (Paths & URLs)
These constants are defined immediately upon request in public/index.php and bootstrap.php. They provide absolute, unchangeable paths to the server structure, ensuring optimal file inclusion performance.
| Constant | Description |
|---|---|
ROOT_DIR | The absolute physical path to the server root. |
PUBLIC_DIR | The public-facing web directory (/public). |
CMS_VERSIONS_DIR | The directory holding all core engine versions. |
CMS_CORE_DIR | The absolute path to the currently active core engine version. |
SITES_DIR | The multi-tenant directory holding all individual sites. |
SITE_HANDLE | The unique identifier of the currently requested site (resolved via Domain Mapping). |
SITE_DIR | The absolute path to the active site's configuration and assets (SITES_DIR / SITE_HANDLE). |
LICENSE_KEY | The global commercial license key loaded from license.php. |
2. Dynamic Environment Constants
Once the specific site is identified, config.php defines URL and security constants based on the active domain and database settings.
| Constant | Description |
|---|---|
SITE_NAME | The official name of the site (fetched from DB). |
SITE_URL | The canonical URL of the site (used for SEO, canonicals, and emails). |
BASE_URL | The current request's base URL (e.g., http://localhost or https://domain.com). |
CMS_DISALLOW_FILE_EDIT | Set to true to disable the in-browser Monaco file editor (Recommended for production). |
3. Global Database Settings ($site->settings)
Unlike immutable physical paths, functional configurations are managed by the administrator in the Back-office and loaded into the $site->settings array.
| Setting Key | Default | Description |
|---|---|---|
debug_mode | 0 | If 1, enables display_errors and sets error_reporting(E_ALL). |
maintenance_mode | 0 | If 1, forces a 503 Maintenance screen for all non-admin visitors. |
active_theme | 'default-theme' | The active theme folder used by the TemplateEngine. |
hide_default_language_in_url | 1 | If true, strips the language code from the URL for the default language. |
4. CMS Identity & Version Metadata
These constants define the identity, versioning, and external references of the Pragma CMS core. They are loaded from version.php and remain immutable during runtime.
| Constant | Description |
|---|---|
CMS_NAME | The official product name of the CMS. |
CMS_VERSION | The current installed core version (semantic versioning). |
CMS_RELEASE_DATE | The release date of the current CMS version. |
CMS_WEBSITE_URL | Official website of Pragma CMS. Used for documentation and branding references. |
CMS_API_URL | Base URL of the official Pragma CMS API (used for updates, marketplace, and services). |