Download a Static Version of Your Site
You should backup your website yourself on a regular basis. It is after all YOUR website, right?
We see questions in help desk tickets that are usually phrased differently like “how can I get a static version of my site?” or “do you use FTP” or similar but basically it’s the same question. And it is a great question. At Tendenci we believe that while all vendors don’t have to be open source like Tendenci is (full source code available at https://github.com/tendenci/tendenci ) they should at least make it easy for you to get your content. But they don’t. So let’s show you how to get it anyway.
Let’s pretend you want to download an entire static (meaning not-database driven but looks almost identical) version of your site on a Mac. First, the free way to do it:
Download Wget for your Mac. The easiest way is using the Rudix packages (Note – I’m typing this on Sept 10, 2015 so with time, check it to be sure it is still safe.)
Then you have to launch terminal. I know terminal is kind of scary if you haven’t used it much so I’ll show you a paid version way of downloading your site in a sec. First the “free” way. Launch terminal on your Mac.
The next line looks complicated. It kind of is, but just copy and paste it replacing the part that reads MYWEBSITE with your web site. You do have to include the “http” part so it’s easiest to go to your site in a web browser and copy it from the address bar.
wget --limit-rate=400k --no-clobber --convert-links --restrict-file-names=windows --random-wait -r -p -E -e robots=off -U mozilla MYWEBSITE
In terminal I highlighted in blue the part that I typed in. In this case, I was making an offline backup static site for one of our clients.
Everything after the blue part (and again copy from where I pasted it above just change the URL to be yours), but everything after the blue part is just the system starting to download the files. It DOES cause load on the server so perhaps don’t run it at lunch or during high traffic times. When it’s done you should be able to see it in finder.
BUT, this isn’t currently on a web server. Still you can view it in your web browser by clicking the “index.html” file for example.
And BOOM! You have all of your files for free! Even if you made a mistake and went with a proprietary vendor a while back. You CAN get your files.
Bonus round for the uber-geeks. If you want to make and build Wget on your mac yourself you can use these lines of code (check for newer versions as this blog post ages of course):
cd ~/Downloads/
curl -O http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz
tar -zxvf wget-1.15.tar.gz
cd wget-1.15/
./configure --with-ssl=openssl
make
sudo make install
rm -rf wget-1.15
rm wget-1.15.tar.gz
Thanks and let’s hear it for Open Source Software like Tendenci. And here’s to open-source software like “Wget” that allows you to get a static copy of your site even from proprietary vendors and their long contracts. Freedom is good.
Lastly, a few (some paid) alternatives to download your site:
https://ricks-apps.com/osx/sitesucker/index.html
For windows, you can google it although I can’t vouch for any of these products so be sure to run your virus scanner and watch for bad guys as always.
-Ed Schipul
P.S This information was recovered thanks to WAYBACK MACHINE The Internet Archive