file.replace:after $newFile, $oldFile /site/config/config.php return [ 'hooks' => [ 'file.replace:after' => function ($newFile, $oldFile) { // your code goes here } ] ]