Replace patterns
🔄
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 be synced into the content of the actual web storage. No old files will be deleted.
When the repository contains a deploy file, this setting is managed there and cannot be edited in the dashboard.
For certain folders, it's better to delete their content.
Sensible defaults based on software templates are provided. Rsync syntax is supported, allowing regex-like patterns. The asterisk * serves as a wildcard. Patterns are matched starting from the Git source directory.
Examples
## Craft CMS
/config/project
## Pattern to replace all JPGs
*.jpg
Related
Exclude patterns are the counterpart: they keep files and folders out of the deployment. They work with both strategies.