Config

$config is the API variable for ProcessWire configuration

It exposes all settings defined in /wire/config.php and /site/config.php, plus runtime state set automatically at boot. It also provides helper methods for paths and URLs, JavaScript config sharing, asset version strings, version checks, and request introspection.

$config is accessible in template files as $config, wire()->config, or config() (if the functions API is enabled); and in modules or other Wire-derived objects as $this->wire()->config.

All settings in /wire/config.php can be overridden by placing them in /site/config.php. You may also define your own custom properties there and read them from $config at runtime.

Paths and URLs

$config->paths and $config->urls

Two Paths objects that expose the server disk path and web URL for every named location in ProcessWire. All values end with a trailing slash.

// Server disk paths
$config->paths->root        // /var/www/html/
$config->paths->site        // /var/www/html/site/
$config->paths->templates   // /var/www/html/site/templates/
$config->paths->assets      // /var/www/html/site/assets/
$config->paths->files       // /var/www/html/site/assets/files/
$config->paths->cache       // /var/www/html/site/assets/cache/
$config->paths->logs        // /var/www/html/site/assets/logs/
$config->paths->modules     // /var/www/html/wire/modules/
$config->paths->siteModules // /var/www/html/site/modules/

// Web URLs (relative from domain root)
$config->urls->root        // / (or /subdir/ if PW is in a subdirectory)
$config->urls->site        // /site/
$config->urls->templates   // /site/templates/
$config->urls->assets      // /site/assets/
$config->urls->files       // /site/assets/files/
$config->urls->modules     // /wire/modules/
$config->urls->admin       // /processwire/ (or your custom admin URL)

// Full http/https absolute URLs (available on $config->urls only)
$config->urls->httpRoot         // https://domain.com/
$config->urls->httpAssets       // https://domain.com/site/assets/
$config->urls->httpFiles        // https://domain.com/site/assets/files/
$config->urls->httpTemplates    // https://domain.com/site/templates/

$config->url($for) and $config->path($for)

Get a single URL or disk path by name. Shorthand for $config->urls->get($for) and $config->paths->get($for).

$url  = $config->url('admin');      // "/processwire/"
$path = $config->path('templates'); // "/var/www/html/site/templates/"

$config->urls($for) and $config->paths($for)

Get a single value (like url() / path()) or, when called with no argument, return the whole Paths object.

$paths = $config->paths();         // Paths object (all paths)
$path  = $config->paths('files');  // "/var/www/html/site/assets/files/"
$path  = $config->paths->files;    // alias of above, better in IDEs

$config->setLocation($for, $dir, $url)

Update both the disk path and web URL for a named location.

  • Arguments: setLocation(string $for, string $dir, string|bool $url = '')
  • Returns: $this
  • $for is any of: cache, logs, files, tmp, templates, or a custom name.
  • Pass false for $url to update the path only (leaving URL unchanged).
  • Paths relative to PW root should omit the leading slash.
// Redirect the templates path and URL to an alternate directory for one user
if($user->name === 'karen') {
    $config->setLocation('templates', 'site/dev-templates/');
}

$config->setPath($for, $path) and $config->setUrl($for, $url)

Update just the disk path or just the web URL for a named location.

$config->setPath('files', '/mnt/shared/files/'); // absolute path outside web root
$config->setUrl('files', 'https://cdn.example.com/');
Scripts and styles

$config->scripts and $config->styles are FilenameArray instances. ProcessWire's admin themes use them to track CSS and JS files to include in the document <head>. You can use the same mechanism for your own front-end templates.

// Add a file
$config->styles->add($config->urls->templates . 'css/main.css');
$config->scripts->add($config->urls->templates . 'js/main.js');

// Prepend (insert before existing entries)
$config->scripts->prepend($config->urls->templates . 'js/vendor.js');

// Remove a file
$config->scripts->remove($config->urls->templates . 'js/main.js');

// Replace one file with another
$config->scripts->replace(
    $config->urls->templates . 'js/old.js',
    $config->urls->templates . 'js/new.js'
);

// Iterate and render tags
foreach($config->styles as $url) {
    echo "<link rel='stylesheet' href='$url'>\n";
}
foreach($config->scripts as $url) {
    echo "<script src='$url'></script>\n";
}

FilenameArray silently deduplicates: adding the same URL twice has no effect.

$config->versionUrls($urls, $useVersion)

Return an array of URLs with cache-busting query strings appended. Used internally by admin themes; also available for your own scripts/styles.

  • Arguments: versionUrls(array|FilenameArray $urls, bool|null|string $useVersion = null)
  • Returns: array
// Render styles with cache-busting version strings
foreach($config->versionUrls($config->styles) as $url) {
    echo "<link rel='stylesheet' href='$url'>\n";
}

// Shortcut on FilenameArray itself (equivalent)
foreach($config->styles->urls() as $url) {
    echo "<link rel='stylesheet' href='$url'>\n";
}
$useVersion valueBehavior
null (default)filemtime in debug/dev, $config->version otherwise
trueAlways use filemtime
falseAlways use $config->version
'1.2.3' (string)Use that exact string as version
'?v=abc' (query string)Use as-is

Set a site-wide default via $config->useVersionUrls in /site/config.php.

$config->versionUrl($url, $useVersion)

Single-URL variant of versionUrls().

$url = $config->versionUrl($config->urls->templates . 'js/app.js');
echo "<script src='$url'></script>";
JavaScript config

Share PHP configuration values with client-side JavaScript. Values are exposed as ProcessWire.config[key].

$config->js($key, $value)

Share an existing $config property or set a new value for the JS side.

  • Arguments: js(string|array|null $key = null, mixed $value = null)
  • Returns: mixed|array|$this
// Set a value that is shared with JS
$config->js('myModule', [
    'baseUrl' => $config->urls->templates,
    'debug'   => $config->debug,
]);

// Share an existing $config property with JS (pass true as value)
$config->js('debug', true);        // exposes $config->debug to JS as-is
$config->js(['debug', 'version'], true); // share multiple properties at once

// Get a shared value from PHP
$val = $config->js('myModule');    // returns the array set above

// Get all shared values (returns array)
$all = $config->js();

$config->jsConfig($key, $value)

Like js(), but values are JS-only — they cannot be read back as $config->key. Preferred for new properties in ProcessWire 3.0.173+.

$config->jsConfig('mySettings', ['foo' => 'bar']);
$val = $config->jsConfig('mySettings'); // ['foo' => 'bar']
$all = $config->jsConfig();             // all JS-config-only values
Version and environment checks

$config->version($minVersion)

Check whether the current ProcessWire version meets a minimum. Pass no argument to get the version string.

if($config->version('3.0.200')) {
    // running PW 3.0.200 or newer
}
echo $config->version; // e.g. "3.0.258"

$config->phpVersion($minVersion)

Check whether the current PHP version meets a minimum.

if($config->phpVersion('8.1.0')) {
    // running PHP 8.1 or newer
}

$config->installedAfter($date) and $config->installedBefore($date)

Check the site installation timestamp. Useful in upgrade code that must run only for installations created after a particular date.

if($config->installedAfter('2024-01-01')) {
    // site was installed after 2024
}
Request introspection

These helpers are available before the API $input variable is ready, making them useful in /site/config.php and boot files.

$config->requestUrl($match, $get)

Get the current request URL (without query string). Pass a string or array of strings to test whether the URL contains any of them.

$url = $config->requestUrl();              // e.g. "/products/2024/"
if($config->requestUrl('/processwire/')) { // true if admin URL
    // ...
}
if($config->requestUrl(['foo', 'bar'])) {  // true if either string appears
    // ...
}
// Get query string only
$qs = $config->requestUrl('', 'query');   // e.g. "page=2&sort=title"

$config->requestPath($match)

Like requestUrl() but strips any subdirectory prefix, returning just the path relative to the PW installation root.

$path = $config->requestPath();           // e.g. "/products/2024/"
if($config->requestPath('/processwire/')) { ... }

$config->requestMethod($match)

Get or match the HTTP request method.

if($config->requestMethod('post')) { ... } // case-insensitive match
$method = $config->requestMethod();        // "GET", "POST", "PUT", etc.
Runtime properties

These properties are set automatically by ProcessWire at boot time and are read-only in normal usage.

PropertyTypeDescription
$config->ajaxbooltrue if current request is an XHR/AJAX request
$config->httpsbooltrue if current request is HTTPS
$config->adminbool or inttrue if current request is in the admin
$config->clibooltrue if PW was booted from the command line
$config->modalbool or intPositive int when request is in a modal window
$config->internalboolfalse when PW is externally bootstrapped
$config->httpHoststringCurrent HTTP hostname
$config->serverProtocolstringe.g. "HTTP/1.1" or "HTTP/2"
$config->versionstringProcessWire version, e.g. "3.0.258"
$config->versionNamestringVersion with suffix, e.g. "3.0.258 dev"
$config->urlsPathsWeb URLs for named locations (see above)
$config->pathsPathsDisk paths for named locations (see above)
$config->stylesFilenameArrayCSS files queued for the current request
$config->scriptsFilenameArrayJS files queued for the current request
Configurable settings

All settings below come from /wire/config.php, where each is documented with full descriptions and defaults. Override any of them in /site/config.php.

System modes

PropertyDefaultDescription
$config->debugfalseEnable debug mode; use true during development
$config->debugIf''Enable debug mode for a specific IP, regex, or callable
$config->advancedfalseAdvanced mode for PW core/module development
$config->demofalseDemo mode — disables POST saves
$config->useFunctionsAPIfalseAllow API variables as global functions
$config->useMarkupRegionsfalseEnable front-end markup regions
$config->usePageClassesfalseEnable custom page classes in /site/classes/
$config->useLazyLoadingtrueLazy-load fields/templates for faster boot

Note: useFunctionsAPI, useMarkupRegions and usePageClasses may have a default value of false in the /wire/config.php file but ProcessWire's default site-blank profile has them all enabled by default. Meaning, most installations will have these settings enabled by default as well.

Dates and times

PropertyDefaultDescription
$config->timezone'America/New_York'PHP timezone string
$config->dateFormat'Y-m-d H:i:s'Default system date format

Session

PropertyDefaultDescription
$config->sessionName'wire'Session cookie name
$config->sessionExpireSeconds86400Inactivity expiry (seconds)
$config->sessionAllowtrueBool or callable to allow/deny sessions per request
$config->sessionChallengetrueUse challenge key for extra security
$config->sessionFingerprint1Fingerprinting level (0=off, see /wire/config.php)
$config->sessionHistory0Number of history entries to keep; 0 = disabled

Template files

PropertyDefaultDescription
$config->prependTemplateFile''File loaded before each template (e.g. _init.php)
$config->appendTemplateFile''File loaded after each template (e.g. _main.php)
$config->templateCompiletrueAllow compiled template files

Files and assets

PropertyDefaultDescription
$config->chmodDir'0755'Octal permissions for newly created directories
$config->chmodFile'0644'Octal permissions for newly created files
$config->uploadBadExtensions'php exe ...'Space-separated disallowed upload extensions
$config->pagefileSecurefalseProtect files on access-restricted pages
$config->pagefileExtendedPathsfalseExtended path mapping for sites with >30,000 pages

HTTP and input

PropertyDefaultDescription
$config->httpHosts[]Whitelist of recognized hostnames (security)
$config->protectCSRFtrueEnable CSRF protection on PW forms
$config->wireInputOrder'get post cookie'Order $input->var searches
$config->noHTTPSfalseDisable HTTPS requirements (dev environments)

Database

PropertyDescription
$config->dbHostDatabase hostname
$config->dbNameDatabase name
$config->dbUserDatabase username
$config->dbPassDatabase password
$config->dbCharset'utf8' or 'utf8mb4'
$config->dbEngine'MyISAM' or 'InnoDB'

System IDs

These integer properties hold the page/template IDs assigned during installation. Rarely needed in template code but useful in modules.

PropertyDescription
$config->rootPageIDHomepage page ID (usually 1)
$config->adminRootPageIDAdmin root page ID
$config->trashPageIDTrash page ID
$config->http404PageID404 page ID
$config->superUserPageIDSuperuser page ID
$config->guestUserPageIDGuest user page ID
Array-property method calls

Config properties that hold associative arrays can be read and updated using a method-call syntax. This lets you get or set individual keys without overwriting the whole array.

// Get one key from an array property
$siteOnly = $config->fileCompilerOptions('siteOnly');

// Set one key (other keys untouched)
$config->fileCompilerOptions('siteOnly', true);

// Set multiple keys at once
$config->fileCompilerOptions([
    'siteOnly'  => true,
    'cachePath' => $config->paths->root . '.my-cache/',
]);

// Unset a key (pass null as first argument, key name as second)
$config->fileCompilerOptions(null, 'siteOnly');

This works for any array-type config property: fileCompilerOptions, imageSizerOptions, webpOptions, wireMail, contentTypes, fileContentTypes, dbOptions, pageList, pageEdit, AdminThemeUikit, and others.

Notes
  • $config extends WireData, so any value not defined in wire/config.php or site/config.php will simply return null.
  • You can define your own site-specific settings in /site/config.php and read them from $config anywhere in your templates.
  • Changes to $config at runtime (e.g. in /site/ready.php) affect all subsequent code in the same request only — they are not persisted.
  • The canonical reference for all configurable settings, their defaults, and inline documentation is /wire/config.php.
  • Source files: wire/core/Config/Config.php, wire/core/Config/Paths.php, wire/core/Config/FilenameArray.php.
API reference: methods, properties, hooks

For more detailed descriptions of these $config properties, including default values, see the /wire/config.php file.


Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Config class also inherits all the methods and properties of: WireData and Wire.

Show $var?     Show args?       Only hookable?    

Common

NameReturnSummary 
$config->AdminThemeUikit()
array string bool
Can also be used as property: $config->AdminThemeUikit
$config->contentTypes()
array string
Can also be used as property: $config->contentTypes
$config->fileCompilerOptions()
array string bool
Can also be used as property: $config->fileCompilerOptions
$config->fileContentTypes()
array string
Can also be used as property: $config->fileContentTypes
$config->imageSizerOptions()
array bool string int float
Can also be used as property: $config->imageSizerOptions
$config->imageSizes()
array
Can also be used as property: $config->imageSizes
$config->markupQA()
array bool
Can also be used as property: $config->markupQA
$config->modals()
array string
Can also be used as property: $config->modals
$config->moduleInstall()
array string
Can also be used as property: $config->moduleInstall
$config->pageAdd()
array string
Can also be used as property: $config->pageAdd
$config->pageEdit()
array bool
Can also be used as property: $config->pageEdit
$config->pageList()
array int bool
Can also be used as property: $config->pageList
$config->statusFiles()
array string
Can also be used as property: $config->statusFiles
$config->substituteModules()
array string
Can also be used as property: $config->substituteModules
$config->webpOptions()
array int bool
Can also be used as property: $config->webpOptions
$config->wireMail()
array string
Can also be used as property: $config->wireMail

Date time

NameReturnSummary 
$config->dateFormat string Default system date format, preferably in sortable string format. Default is 'Y-m-d H:i:s'  
$config->timezone string Current timezone using PHP timeline options: http://php.net/manual/en/timezones.php  

URLs

NameReturnSummary 
$config->longUrlResponse int Response code when URL segments, depth or length exceeds max allowed.  
$config->maxPageNum int Maximum number of recognized paginations  
$config->maxUrlDepth int Maximum URL/path slashes (depth) for request URLs. (Min=10, Max=60)  
$config->maxUrlSegmentLength int Maximum length of any individual URL segment .
DEFAULT: 128
 
$config->maxUrlSegments int Maximum number of extra stacked URL segments allowed in a page's URL (including page numbers)  
$config->pageNameCharset string Character set for page names, must be 'ascii' (default, lowercase) or 'UTF8' (uppercase).  
$config->pageNameUntitled string Name to use for untitled pages .
DEFAULT: "untitled"
 
$config->pageNameWhitelist string Whitelist of characters allowed in UTF8 page names.  
$config->pageNumUrlPrefix string Prefix used for pagination URLs. Default is "page", resulting in "/page1", "/page2", etc.  
$config->pageNumUrlPrefixes array Multiple prefixes that may be used for detecting pagination (internal use, for multi-language)  
$config->requestPath()
string

Current unsanitized request path (URL sans ProcessWire installation subdirectory, if present)

 
$config->requestUrl()
string

Current unsanitized request URL

 
$config->setLocation(string $for, string $dir)
self

Given a directory to a named location, updates $config->paths and $config->urls for it

 
$config->setUrl(string $for, string $url)
self

Change or set just the URL for the named location (leaving server disk path as-is)

 
$config->url($for)
string null

Get URL for requested resource or module

 
$config->urls()
null string Paths

Get URL for requested resource or module or get all URLs if no argument


Can also be used as property: $config->urls
 
$config->versionUrl(string $url)
string

Given a file asset URLs return it with cache-busting version string

 
$config->versionUrls($urls)
array

Given array of file asset URLs return them with cache-busting version strings

 

Paths

NameReturnSummary 
$config->path(string $for)
null string

Get disk path for requested resource or module

 
$config->paths()
null string Paths

Get disk path for requested resource or module or get all paths if no argument


Can also be used as property: $config->paths
 
$config->setLocation(string $for, string $dir)
self

Given a directory to a named location, updates $config->paths and $config->urls for it

 
$config->setPath(string $for, string $path)
self

Change or set just the server disk path for the named location (leaving URL as-is)

 

Js

Javascript configuration

NameReturnSummary 
$config->js()
array mixed null this

Set or retrieve a config value to be shared with javascript

 
$config->jsConfig()
mixed null array self

Set or retrieve a config value exclusive to Javascript (ProcessWire.config)

 

Tools

NameReturnSummary 
$config->installedAfter($date)
bool

Was this ProcessWire installation installed after a particular date?

 
$config->installedBefore($date)
bool

Was this ProcessWire installation installed before a particular date?

 
$config->phpVersion($minVersion)
bool

Return true if current PHP version is equal to or newer than the given version

 
$config->requestMethod()
string

Current request method

 
$config->requestPath()
string

Current unsanitized request path (URL sans ProcessWire installation subdirectory, if present)

 
$config->requestUrl()
string

Current unsanitized request URL

 
$config->version()
bool string

Check if current ProcessWire version is equal to or newer than given version, or return current version


Can also be used as property: $config->version
 
$config->versionUrl(string $url)
string

Given a file asset URLs return it with cache-busting version string

 
$config->versionUrls($urls)
array

Given array of file asset URLs return them with cache-busting version strings

 

Runtime

NameReturnSummary 
$config->admin bool int Is current request for logged-in user in admin? True, false, or 0 if not yet known. 3.0.142  
$config->ajax bool If the current request is an ajax (asynchronous javascript) request, this is set to true.  
$config->cli bool This is automatically set to TRUE when PW is booted as a command line (non HTTP) script.  
$config->https bool If the current request is an HTTPS request, this is set to true.  
$config->internal bool This is automatically set to FALSE when PW is externally bootstrapped.  
$config->modal bool int If the current request is in a modal window, this is set to a positive number. False if not.  
$config->pagerHeadTags string null Populated at runtime to contain <link rel=prev|next /> tags for document head, after pagination has been rendered by MarkupPagerNav module.  
$config->requestMethod()
string

Current request method

 
$config->requestPath()
string

Current unsanitized request path (URL sans ProcessWire installation subdirectory, if present)

 
$config->requestUrl()
string

Current unsanitized request URL

 
$config->scripts FilenameArray Array used by ProcessWire admin to keep track of what javascript files its template should load. It will be blank otherwise. Feel free to use it for the same purpose in your own sites.  
$config->serverProtocol string Current server protocol, one of: HTTP/1.1, HTTP/1.0, HTTP/2, or HTTP/2.0.  
$config->styles FilenameArray Array used by ProcessWire admin to keep track of what stylesheet files its template should load. It will be blank otherwise. Feel free to use it for the same purpose in your own sites.  
$config->systemVersion int System version, used by SystemUpdater to determine when updates must be applied.  
$config->versionName string This is automatically populated with the current PW version name (i.e. 2.5.0 dev)  

HTTP and input

NameReturnSummary 
$config->cookieOptions array Options for setting cookies from $input->cookie  
$config->httpHost string Current HTTP host name.  
$config->httpHosts array HTTP hosts For added security, specify the host names ProcessWire should recognize.  
$config->noHTTPS bool string array When boolean true, pages requiring HTTPS will not enforce it (useful for dev environments). May also specify hostname (string) or hostnames (array) to disable HTTPS for.  
$config->protectCSRF bool Enables CSRF (cross site request forgery) protection on all PW forms, recommended for security.  
$config->wireInputArrayDepth int Maximum multi-dimensional array depth for input variables accessed from $input or 1 to only allow single dimension arrays.  
$config->wireInputLazy bool Specify true for $input API var to load input data in a lazy fashion and potentially use less memory. Default is false.  
$config->wireInputOrder string Order that variables with the $input API var are handled when you access $input->var.  

System

NameReturnSummary 
$config->PageFinder array Settings for the PageFinder class.  
$config->adminEmail string Email address to send fatal error notifications to.  
$config->adminTemplates array Names of templates that ProcessWire should consider exclusive to the admin.  
$config->advanced bool Special mode for ProcessWire system development. Not recommended for regular site development or production use.  
$config->allowExceptions bool Allow Exceptions to propagate?
DEFAULT: false, specify true only if you implement your own exception handler
 
$config->debug bool int string Special mode for use when debugging or developing a site. Recommended TRUE when site is in development and FALSE when not. Or set to Config::debug* constant.  
$config->debugIf string callable array Enable debug mode if condition is met. One of IP address to match, regex to match IP, array of IPs to match, or callable function that returns true|false.  
$config->debugTools array Tools, and their order, to show in debug mode (admin)  
$config->demo bool Special mode for demonstration use that causes POST requests to be disabled. Applies to core, but may not be safe with 3rd party modules.  
$config->fatalErrorCode int HTTP code to send on fatal error (typically 500 or 503).  
$config->fatalErrorHTML string HTML used for fatal error messages in HTTP mode.  
$config->installed int Timestamp of when this PW was installed, set automatically by the installer for future compatibility detection.  
$config->lazyPageChunkSize int Chunk size for for $pages->findMany() calls.  
$config->phpMailAdditionalParameters string null Additional params to pass to PHP’s mail() function (when used), see $additional_params argument at https://www.php.net/manual/en/function.mail.php  
$config->preloadCacheNames array Cache names to preload at beginning of request  
$config->systemVersion int System version, used by SystemUpdater to determine when updates must be applied.  
$config->tableSalt string Additional hash for other (non-authentication) purposes.  
$config->useFunctionsAPI bool Allow most API variables to be accessed as functions? (see /wire/core/FunctionsAPI.php)  
$config->useLazyLoading bool array Delay loading of fields (and templates/fieldgroups) till requested? Can improve performance on systems with lots of fields or templates.  
$config->useMarkupRegions bool int Enable support for front-end markup regions? True to enable or int 2 to enable also with file regions.  
$config->usePageClasses bool Use custom Page classes in /site/classes/[TemplateName]Page.php?  
$config->usePoweredBy bool Use the x-powered-by header? Set to false to disable.  
$config->useVersionUrls bool int string null Default value for $useVersion argument of $config->versionUrls() method  

Template files

NameReturnSummary 
$config->appendTemplateFile string PHP file in /site/templates/ that will be loaded after each page's template file
DEFAULT: none
 
$config->ignoreTemplateFileRegex string Regular expression to ignore template files  
$config->prependTemplateFile string PHP file in /site/templates/ that will be loaded before each page's template file
DEFAULT: none
 
$config->templateCompile bool Allow use of compiled templates?  
$config->templateExtension string Default is 'php'  

Files

NameReturnSummary 
$config->chmodDir string Octal string permissions assigned to directories created by ProcessWire  
$config->chmodFile string Octal string permissions assigned to files created by ProcessWire  
$config->chmodWarn bool Set to false to suppress warnings about 0666/0777 file permissions that are potentially too loose  
$config->pagefileExtendedPaths bool Use extended file mapping?  
$config->pagefileSecure bool When used, files in /site/assets/files/ will be protected with the same access as the page. Routes files through a passthrough script. Note if applying to existing site it may not affect existing pages and file/image fields until they are accessed or saved.  
$config->pagefileSecurePathPrefix string One or more characters prefixed to the pathname of protected file dirs. This should be some prefix that the .htaccess file knows to block requests for.  
$config->uploadBadExtensions string Space separated list of file extensions that are always disallowed from uploads.  
$config->uploadTmpDir string Optionally override PHP's upload_tmp_dir with your own. Should include a trailing slash.  

Session

NameReturnSummary 
$config->loginDisabledRoles array Array of role name(s) or ID(s) of roles where login is disallowed.  
$config->sessionAllow bool callable Are sessions allowed? Typically boolean true, unless provided a callable function that returns boolean. See /wire/config.php for an example.  
$config->sessionCacheLimiter array callable Session cache limiter setting for guest, login and admin contexts.  
$config->sessionChallenge bool Should login sessions have a challenge key? (for extra security, recommended)  
$config->sessionCookieDomain null string Domain to use for sessions, which enables a session to work across subdomains, or NULL to disable (default/recommended).  
$config->sessionCookieSameSite string Cookie “SameSite” value for sessions - “Lax” (default) or “Strict”.  
$config->sessionCookieSecure bool int Use secure cookies when on HTTPS? When enabled, separate sessions will be maintained for HTTP vs. HTTPS. Good for security but tradeoff is login session may be lost when switching .
DEFAULT: 1 or true
 
$config->sessionExpireSeconds int How many seconds of inactivity before session expires?  
$config->sessionFingerprint int bool Should login sessions be tied to IP and user agent? 0 or false: Fingerprint off. 1 or true: Fingerprint on with default/recommended setting (currently 10). 2: Fingerprint only the remote IP. 4: Fingerprint only the forwarded/client IP (can be spoofed). 8: Fingerprint only the useragent. 10: Fingerprint the remote IP and useragent (default). 12: Fingerprint the forwarded/client IP and useragent. 14: Fingerprint the remote IP, forwarded/client IP and useragent (all).  
$config->sessionForceIP string Force the client IP address returned by $session->getIP() to be this rather than auto-detect (useful with load balancer). Use for setting value only.  
$config->sessionHistory int Number of session entries to keep .
DEFAULT: 0, which means off
 
$config->sessionName string Default session name to use
DEFAULT: 'wire'
 
$config->sessionNameSecure string Session name when on HTTPS. Used when the sessionCookieSecure option is enabled (default). When blank (default), it will assume sessionName + 's'.  
$config->userAuthHashType string Default is 'sha1' - used only if Blowfish is not supported by the system.  
$config->userAuthSalt string Salt generated at install time to be used as a secondary/non-database salt for the password system.  
$config->userOutputFormatting bool Enable output formatting for current $user API variable at boot?
DEFAULT: false
 

Images

NameReturnSummary 
$config->adminThumbOptions array Admin thumbnail image options  

Database

NameReturnSummary 
$config->dbCache bool Whether to allow MySQL query caching.  
$config->dbCharset string Default is 'utf8' but 'utf8mb4' is also supported.  
$config->dbEngine string Database engine (MyISAM or InnoDB)  
$config->dbHost string Database host  
$config->dbInitCommand string Database init command, for PDO::MYSQL_ATTR_INIT_COMMAND. Note placeholder {charset} gets replaced with $config->dbCharset.  
$config->dbLowercaseTables bool Force any created field_* tables to be lowercase.  
$config->dbName string Database name  
$config->dbOptions array Any additional driver options to pass as $options argument to "new PDO(...)".  
$config->dbPass string Database password  
$config->dbPath string MySQL database exec path (Path to mysqldump)  
$config->dbPort string Database port
DEFAULT: 3306
 
$config->dbQueryLogMax int Maximum number of queries WireDatabasePDO will log in memory, when debug mode is enabled .
DEFAULT: 1000
 
$config->dbReader array null Configuration values for read-only database connection (if available).  
$config->dbSocket string Optional DB socket config for sites that need it.  
$config->dbSqlModes array Set or adjust SQL mode per MySQL version, where array keys are MySQL version and values are SQL mode command(s).  
$config->dbStripMB4 bool When dbEngine is not utf8mb4 and this is true, we will attempt to remove 4-byte characters (like emoji) from inserts when possible. Note that this adds some overhead.  
$config->dbUser string Database user  

Modules

NameReturnSummary 
$config->moduleCompile bool Allow use of compiled modules?  
$config->moduleServiceKey string API key for modules web service  
$config->moduleServiceURL string URL where the modules web service can be accessed  

Admin

NameReturnSummary 
$config->defaultAdminTheme string Default admin theme: AdminThemeUikit, AdminThemeDefault or AdminThemeReno.  
$config->logIP bool Include IP address in logs, when applicable?  
$config->logs array Additional core logs to keep  

System IDs

NameReturnSummary 
$config->adminRootPageID int Page ID of admin root page  
$config->externalPageID int Page ID of page assigned to $page API variable when externally bootstrapped  
$config->guestUserPageID int Page ID of the guest (default/not-logged-in) user.  
$config->guestUserRolePageID int Page ID of the guest user role (inherited by all users, not just guest).  
$config->http404PageID int Page ID of the 404 “page not found” page.  
$config->loginPageID int Page ID of the admin login page.  
$config->permissionTemplateID int Template ID of the permission template.  
$config->permissionsPageID int Page ID of the page having permissions as children.  
$config->preloadPageIDs array Page IDs of pages that will always be preloaded at beginning of request  
$config->roleTemplateID int Template ID of the role template.  
$config->rolesPageID int Page ID of the page having roles as children.  
$config->rootPageID int Page ID of homepage (usually 1)  
$config->superUserPageID int Page ID of the original superuser (created during installation).  
$config->superUserRolePageID int Page ID of the superuser role.  
$config->trashPageID int Page ID of the trash page.  
$config->userTemplateID int Template ID of the user template.  
$config->userTemplateIDs array Array of template IDs when multiple allowed for users.  
$config->usersPageID int Page ID of the page having users as children.  
$config->usersPageIDs array Populated if multiple possible users page IDs (parent for users pages)  

Additional methods and properties

In addition to the methods and properties above, Config also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.261