I am trying to deploy a WordPress website from a test server to a production server. wget seems to be an efficient solution for transferring lots of files between 2 servers via FTP. I connect to the target server, go to the /var/www folder, and I type :wget -r ftp://fred:password@ftp.myserver.com/mywebsite/I runs 2 minutes and then states that 2312 files have been transferred. Well, but Filezilla would find over 5000 files ! At first, I notice that the .htaccess file was ignored.How does it come not all files have been handled by wget? How can I specify that I need all the files to be transferred?
Why is wget ignoring some files in ftp transfer?
wget;ftp
The default recursion depth limit in wget is 5. This is primarily meant for the web where a large recursion is often a mistake, but the default also applies to FTP. Large recursion could also be a problem with FTP if the server has upward-pointing symbolic links.To make a complete mirror, pass -l -1 to make the recursion unlimited, or better, pass the --mirror option.