cPanel File Manager includes built-in tools to compress files and folders into archives, as well as extract existing archives. This is useful for creating backups, transferring large numbers of files, and installing software like WordPress from a downloaded zip file. This guide covers both operations.
Compressing Files or Folders
- Log in to your cPanel account.
- Go to Files → File Manager.
- Navigate to the directory containing the files or folders you want to compress.
- Select the files or folders by clicking the checkbox next to each one.
- Right-click the selection and choose Compress, or click Compress from the toolbar at the top.
- In the dialog box that appears:
- Compression Type: Choose
Zip(widely compatible) orGzipped Tar Archive (.tar.gz)(smaller file size, common on Linux). - Archive Path: The file manager will suggest a name (e.g.,
filename.zip). You can change this if needed.
- Compression Type: Choose
- Click Compress File(s).
- A success message will appear, and the compressed archive will appear in the current directory.
Extracting a Compressed Archive
- In File Manager, navigate to the directory containing the compressed file (
.zip,.tar.gz,.tar,.gz, or.bz2). - Select the compressed file by clicking its checkbox.
- Right-click and choose Extract, or click Extract from the toolbar.
- In the dialog box:
- Extract to: Choose the directory where you want the files to be extracted. By default, it uses the current directory.
- You can also type or browse to a different path.
- Click Extract File(s).
- A success message will confirm the extraction, showing the number of files extracted.
Common Use Cases
- Creating a website backup: Compress your entire
public_htmlfolder into a.tar.gzor.zipfile and download it. - Installing WordPress: Download the WordPress zip file, upload it to
public_html, and extract it. - Transferring files: Compress multiple files into a single archive to upload or download them faster.
- Freeing up space: Compress old or infrequently accessed folders to save disk space.
Zip vs Tar.gz — Which to Use?
- Zip (.zip): Most widely compatible format. Works on Windows, macOS, and Linux without additional software. Best for sharing files with others or downloading to your computer.
- Gzipped Tar (.tar.gz): Produces smaller file sizes. Best for server-to-server backups or when storage space is a concern. Requires extraction software on Windows.
Important Notes
- Large compression or extraction operations may take several seconds or longer depending on file sizes. Be patient and do not navigate away from the page.
- Extracting a zip file into a directory that already contains files with the same names will overwrite the existing files without warning.
- The maximum upload size through File Manager is set by your hosting provider. If you need to upload large files, use FTP instead.
Troubleshooting
Compression fails with an error:
- Check that your cPanel account has sufficient disk space to create the archive.
- Ensure the directory is writable (the file permissions should allow writing).
Extraction fails or produces empty files:
- The archive may be corrupted. Try re-uploading it or downloading it again.
- Verify the file is a supported format (
.zip,.tar.gz,.tar,.gz,.bz2).
Cannot find extracted files:
- Check the extraction path — files may have been extracted into a subdirectory within the archive.
- Refresh the File Manager to see updated contents.