See: viewtopic.php?f=556&t=2479086#p15053331 for the reason
$old_doc-handling? Your comment is
// remove the old doc if set, but you don't check if it is set, so even if it is unset your
@unlinkis executed. Maybe you delete the complete content of the folder?
config.phpisn't cached any longer.
.htaccessand you should be connected to your new database.
file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0- Speak to your host to enable