How to gzip a folder?
Gzip can only compress a single file. tar can archive multiple files, but it doesn't compress them. Therefore the two tools are oftne used together: first you archive all the files into one with tar, then you compress that file with gzip (that's the z option in the tar command).
tar -cvzpf archive.tar.gz /home/example/public_html/folder
To uncompress again:
tar -xvzpf archive.tar.gz