We are assuming that you have successfully created a new web hosting account.

We also assume that you have logged in to your brand-new cPanel hosting panel interface.

With these done, scroll to the Files section and click on the File Manager icon.

Locate the folder that has the files you want to compress.

Select to highlight (macOS "command ⌘" and "CTRL" Linux & Windows) all the files you want to compress.

Visually confirm the selection.

Select "Compress" from the top right corner of the upper toolbar.

Select the archive type (.zip, .tar, .gz, or .bz2).

Ideally, set a custom name for the archive instead of using the automatic name that cPanel has chosen for you.

Click the Compress File(s) button.

Once the compression is complete, close the window.

Now highlight the newly created archive, and download it using the Download option in the toolbar.

 

To compress files, a directory or directories, use tar or zip command from within the directory you wish to archive:

tar -czvf about.tar public_html/about/

or:

tar -czvf about.tar.gz public_html/about/

 

If you are already in the public_html:

pwd

tar -czvf about.tar about/

or:

tar -czvf about.tar.gz about/

 

To delete/remove files from the tarball:

tar --delete -f about.tar $filename

 

To use zip to archive multiple files:

zip files.zip testfile1.txt testfile2.txt testfile3.txt testfile4.txt

To specify multiple files having the same extension for instance, to zip all the files ending with .txt extension in a zip file named files1.zip, issue the following wildcard command in the Terminal:

zip files1.zip *.txt

To create zip of all files in /public_html directory:

zip public_html.zip /public_html/*

To zip the wp-content directory recursively to the test.zip file, the command would be:

zip -r wp-content.zip wp-content/

Was this answer helpful? 0 Users Found This Useful (0 Votes)