Install the complete package with local command reference and every published mode.
install replacereplaceUse -e txt,php for extensions or -g "*.php" for a filename mask. -i ignores case for plain-text matches. -p expects a full PHP regular expression, including delimiters such as ~draft~. The -a option includes normally skipped dependency and cache folders.
Add -b with -w to preserve the previous file as .bak, then .bak-001 and so on. Existing backups are never overwritten, and recursive scans skip them. Files above 4 MiB and binary files are skipped; there is a 5000-file scan limit.
replace <old> <new> [path] [options]replace <old> <new>preview replacements in files of the current directory
replace <old> <new> <file>preview replacements in one file
replace <old> <new> <dir> -rpreview replacements recursively inside a directory
-wwrite the planned changes atomically
-imatch plain text without case sensitivity
-ptreat <old> as a complete PHP regular expression
-e <exts>limit extensions, for example php,js,css or tar.gz
-g <glob>limit basenames with a glob such as *.php
-bcreate .bak copies before writing
-ainclude vendor, node_modules, VCS and cache directories
Use -e txt,php for extensions or -g "*.php" for a filename mask. -i ignores case for plain-text matches. -p expects a full PHP regular expression, including delimiters such as ~draft~. The -a option includes normally skipped dependency and cache folders.
Add -b with -w to preserve the previous file as .bak, then .bak-001 and so on. Existing backups are never overwritten, and recursive scans skip them. Files above 4 MiB and binary files are skipped; there is a 5000-file scan limit.
Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.
Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.
Base and Minimum are two packages of the same current module release, not separate command versions.
Install the complete package with local command reference and every published mode.
install replaceInstall the reduced package. Local reference is omitted;
install replace -mInstall exactly this published version.
install replace -v 1.1.5Ask upgrade to check compatibility and replace the installed block only when needed.
upgrade replaceRemove the extension block while leaving the core and unrelated modules intact.
install replace -uExamples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.
cd \sandbox | replace draft published workspace/replace.txtPreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\workspace\replace.txt -wReplaced 2 occurrences in 1 file
workspace/replace.txt 2
replace DRAFT published \sandbox\workspace\replace.txt -iPreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace "~draft~" published \sandbox\workspace\replace.txt -pPreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\workspace -r -e txtPreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\workspace -r -g "*.txt"Preview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\workspace\replace.txt -w -bReplaced 2 occurrences in 1 file
workspace/replace.txt 2
Backups 1
workspace/replace.txt.bakreplace draft published \sandbox\workspace -r -a -e txtPreview 3 replacements in 2 files
workspace/replace.txt 2
workspace/vendor/review.txt 1
Write use -w to apply changesreplace draft published \sandbox\workspacePreview 2 replacements in 1 file
workspace/replace.txt 2
Write use -w to apply changesreplace draft published \sandbox\missing.txtPath not foundreplace draft published \sandbox\workspace\replace.txt -pInvalid regular expressionreplace draft published \sandbox\workspace\replace.txt -w -b | replace published final \sandbox\workspace\replace.txt -w -bReplaced 2 occurrences in 1 file
workspace/replace.txt 2
Backups 1
workspace/replace.txt.bak
Replaced 2 occurrences in 1 file
workspace/replace.txt 2
Backups 1
workspace/replace.txt.bak-001sandbox/workspace/replace.txtThe example uses a file or directory from the protected /sandbox/ documentation workspace.
status=draft
owner=lil
status=draft
Directory scans skip generated backup names (.bak, .bak-001, etc.); explicit backup paths remain available.