Exclude all log files in the cloning process in WP Staging on child sites.
Snippet Type
Execute on Child Sites
Snippet
function wpstg_clone_excluded_files($default)
{
$files = array('custom-file', '*LOG-*', '*.logs');
return array_merge($default, $files);
}
Hi Sebastian,
Thanks for sharing this snippet.
If I wanted to exclude backup files created by Updraft (or other backup plugins, could I make the following modification?
$files = array(‘custom-file’, ‘LOG-’, ‘.logs’, 'backup_2022.zip’,’ backup_2022.gz’);*
Updraft creates files with the backup_2022 naming convention.
I imagine that the staging process would be slightly quicker this way.
Thanks.
Sri
One option would be to exclude the backup folder created by UpdraftPlus in WP Staging.
function wpstg_exclude_folders_custom($args){
$folders = array('/updraft');
return array_merge($args, $folders);
}
add_filter('wpstg_clone_excl_folders', 'wpstg_exclude_folders_custom');
system
(system)
Closed
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.