Quickly Backup a Site Through FTP with wget
If you want to quickly backup an entire website through FTP, the absolute easiest way to do this is through the command line using the wget command.
The syntax we’ll use is as follows:
wget -r ftp://username:firstname.lastname@example.org/
Change the username and password to the appropriate login information, and change the domain to the site you wish to mirror/backup. If you’re curious, the -r flag just stands for recursive.
The entire website will be backed up locally in the directory the wget command was ran from, to prevent any potential clutter you may want to make a quick directory using mkdir and run wget from there, particularly if you’re working with very large web sites.
We’ve used wget to mirror a website locally before, it’s a powerful tool and is a worthwhile install if you’re an advanced user and don’t have it on your Mac already. Installing wget requires you to install something like XCode, HomeBrew, or MacPorts first, each of which also gives you access to thousands of other command line tools either through compiling source or prepackaged binaries.