Get Started

Configuration

You can customise Shield’s settings using a PHP configuration file. This is optional: each setting has a default, so you only need to include the values you want to change.

To override a setting, create shield.php in your Craft project’s /config directory and return an array of setting names and values. For example, the following will enable submission logging:

<?php

return [
    'logSubmissions' => true,
];

All other settings keep their defaults. Add any further settings you want to change to the same array. The options below explain the available settings and their defaults.

Configuration Options

akismetApiKey

The API key for Akismet.

akismetOriginUrl

The origin URL for Akismet.

logSubmissions

Whether to log submissions.

enableContactFormSupport

Whether to enable support for the Contact Form (opens new window) plugin.

enableGuestEntriesSupport

Whether to enable support for the Guest Entries (opens new window) plugin.

enableUserRegistrationSupport

Whether to enable support for Craft public user registrations.