Timeout on Clone
-
Hi,
Thanks for creating this awesome plugin.
I integrated my plugin with more than 5K active installs with clone function in your plugin but in large scale websites I received timeout error in clone process.I investigated the issue and it seems the error is related to
ns_recursive_dir_copy
function of your plugin. It tries to clone all directories and files ofwp-content/uploads
directory to thesites/[new-blog-id]
and it faced timeout due to large amount of files.One of the directories that you’re trying to copy belongs to my plugin and normally has hundred thousands of images and actually your plugin never should copy that directory.
To fix that please add following filter to
ns_recursive_dir_copy
function so I can exclude my own directory using that filter. This way your plugin don’t face timeout error during clone.$files = apply_filters('ns_cloner_site_dir_copy', scandir($src), $src, $dst);
It should be added instead of following line.
$files = scandir($src);
You can change the filter name to whatever you like.
Looks forward to hear back from you soon.
- The topic ‘Timeout on Clone’ is closed to new replies.