Configuration and Environment Variables

Where TruCMS keeps its own configuration, and the .env keys you are likely to meet. Standard Laravel files (app.php, database.php, mail.php…) behave as usual and are not repeated here.

Who writes .env

The web installer writes the first .env (application key, URL, name, database, mail sender, APP_INSTALLED=true). After that, many settings screens store their fields in .env and run dotartisan:optimize, which caches config and routes. Prefer the settings screens; if you edit .env by hand, run php artisan optimize:clear afterwards. Read values with config() in code; env() belongs only in config/ files (static analysis enforces it).

TruCMS config files

FileHolds
config/dotartisan.phpCore switches: installed, demo, version, admin_prefix, super_admin_role, front_theme, locales, upload disks and paths, cookie-consent name and lifetime, date formats
config/plugins.phpPlugin Manager limits (upload size, file counts, path length), staging and trash folders, lock time, and the list of protected plugins
config/modules.phpModule generator paths and the file activator (modules_statuses.json)
config/slugs.phpmodels: sluggable models handled by slugs:backfill; reserved: first URL segments a page can never use (admin, api, build, storage, themes, vendor, up)
config/page_builder.phpAI assistant limits: approved image hosts, image size and types, allowed class patterns
config/template_packages.php.trucms.zip import limits: upload size, entries, compression ratio, per-asset size, staging time, remote download limits
config/responsecache.phpResponse cache store, lifetimes, ignored and uncached query parameters, cookies that vary the key, profile, hasher and replacers
config/themes.phpTheme folder (resources/themes) and manifest caching
config/tickets.phpSupport tickets: attachments, open-ticket limit, auto-close days, priorities, categories
config/setting.phpThe database settings store (table settings)
config/localized-routes.php, config/translatable.phpSupported locales (from APP_LOCALES), URL prefixes and translation model lookup
config/cdn.phpLegacy CDN push settings. The CDN settings screen is disabled in this release

A plugin's own config/config.php is merged under config('{alias}'). Gateway plugins merge theirs under config('trupayments.gateways.{key}').

Environment variables

Application

KeyDefault in .env.exampleMeaning
APP_INSTALLEDfalseUntil it is true every request is redirected to the web installer (/install/pre-installation)
APP_ADMIN_URLadminAdmin URL prefix (config('dotartisan.admin_prefix')). Use it in your admin route groups
APP_FRONT_THEMEechoThe public theme
APP_SUPER_ADMIN_ROLE1Role id that bypasses every authorisation check
APP_LOCALE, APP_LOCALES, APP_FALLBACK_LOCALEen, en,ar, enDefault, enabled and fallback languages; maintained by the Languages screen
APP_VERSION1.0.0Installed version; written by the updater
APP_DEMOfalseDemo mode: blocks writes for the demo accounts and enables the public showcase
APP_DEBUG, DEBUGBAR_ENABLEDfalseDebugging. The installer sets production values; turn them on only on development copies
COOKIE_CONSENT_ENABLED1Show the cookie-consent banner

Files and media

KeyDefaultMeaning
PUBLIC_FILES_DISK, PUBLIC_FILES_PATHpublic, uploadsWhere public uploads go (local, public, s3 or wasabi, chosen in Settings → Uploading)
MEDIA_DISK, MEDIA_PREFIXthe public disk, mediaMedia library storage
UPLOADER_TEMP_DISK, UPLOADER_TEMP_PATH, UPLOADER_CHUNKS_PATHlocal, temp, uploads/chunksTemporary uploads
AWS_*, WAS_*emptyS3 and Wasabi credentials
IMAGE_DRIVERgdImage processing driver
TEMPLATE_PACKAGE_MAX_ASSET_BYTES10 MBLargest single file a template package may carry

Cache, queue and sessions

KeyDefaultMeaning
CACHE_DRIVERfileApplication cache store
QUEUE_CONNECTIONsyncJobs run inline unless changed (Settings → General → Queue)
SESSION_DRIVER, SESSION_LIFETIMEfile, 120Sessions
BROADCAST_DRIVERlogBroadcasting is not used
RESPONSE_CACHE_ENABLEDfalseFull-page cache switch (Settings → Cache)
RESPONSE_CACHE_LIFETIME, RESPONSE_CACHE_AUTHENTICATED_LIFETIME, RESPONSE_CACHE_QUERY_LIFETIMEabout 7 days, 15 min, 15 minLifetimes in seconds
RESPONSE_CACHE_HEADERtrueAdd X-Cache-Status and related debug headers

Mail, sign-in and integrations

KeyMeaning
MAIL_*Mail transport; log until configured in Settings → Mail
FACEBOOK_CLIENT_ID, FACEBOOK_CLIENT_SECRET, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRETSocial sign-in, set in Settings → General
GOOGLE_FONTS_API_KEYOptional; the font picker falls back to the public catalogue without it
TRUPAYMENTS_{GATEWAY}_*Gateway mode and credentials written by each gateway's settings screen

Reading configuration in a plugin

config('dotartisan.admin_prefix');             // 'admin'
config('dotartisan.installed');                // bool
config('testimonials.default_limit', 6);       // your module's config/config.php
setting('testimonials_default_limit', 6);      // a value an administrator can change

Use config for values that are fixed per deployment, and settings for values a site owner changes from the admin.