Cookies ahead

Our support chat tool "Intercom" would like to collect some more data on you. See the related link for more details.

Docs

Replace patterns

Reviewed

Markdown ↓

🔄

Which files get replaced.

A setting to define files and folders to be replaced during deployment with merge strategy.

This is essential to avoid old files cluttering the system and confusing the software. This setting is only available when the deployment strategy is set to 'merge'. Note that with the merge strategy, all files from the deployment build will synced into the content of the actual web storage. No old files will be deleted.

For certain folders, it's better to delete their content.

Sensible defaults based on software templates are provided. Rsync syntax is supported.

Rsync syntax is supported, allowing regex like patterns. The asterisk * serves as a wildcard.

Examples

## Craft CMS
/config/project

## Pattern to replace all JPGs
*.jpg
yml

When the deployment strategy is set to replace, there is an opposite setting to define exclude patterns.

Written by a human. Review, grammar checks and typo fixes by AI.

AI use & editorial processEdit on GitHub ↗