Lesson 4: Detailed File Management Using cPanel & FTP

1. Managing Files via File Manager

The "File Manager" in cPanel provides a graphical interface to easily manage your website files and folders. Below is a detailed explanation of its features:

  1. Opening File Manager:

    From the cPanel home page, click on the "File Manager" icon.

  2. Navigating Directories:

    When File Manager opens, you will see the directory structure. The main folder is "public_html", which contains your website files.

  3. Uploading Files:

    Click the "Upload" button to select and upload files from your computer to the desired directory.

  4. Changing File Permissions:

    To change file permissions, right-click the file and select "Change Permissions". Permissions are represented numerically (e.g., 755 for folders and 644 for files) to control who can read, write, and execute the file.

  5. Compressing Files:

    To compress files (group multiple files or reduce size), right-click the file or folder and select "Compress", then choose a compression format (such as ZIP).

  6. Extracting Files:

    If you have a compressed file, right-click it and select "Extract" to decompress it into the specified folder.

  7. Editing Files:

    To edit a text file (HTML, PHP, etc.), right-click the file and select "Edit" to open the built-in text editor, make your changes, and then save the file.

  8. Renaming or Moving Files:

    You can rename or move files between folders by right-clicking and selecting "Rename" or "Move".


2. Managing Files via FTP

FTP provides a method to transfer files between your computer and the hosting server. Follow these steps to manage files using FTP:

  1. Creating an FTP Account:

    In cPanel, navigate to the "FTP Accounts" section and create a new FTP account with a unique username and password.

  2. Setting Up an FTP Client:

    Download an FTP client like FileZilla. After installation, enter your connection details such as "Server Address", "Username", "Password", and the port (usually 21).

  3. Transferring Files:

    Once connected, you can drag and drop files between your computer and the server to upload or download as needed.

  4. Changing File Permissions via FTP:

    Most FTP clients allow you to change file permissions by right-clicking a file and selecting "File Permissions", then adjusting the numeric values.

  5. Note on Compression:

    FTP does not typically offer built-in tools for compressing or decompressing files; it is recommended to use File Manager for those tasks.


3. Additional Tips and Best Practices

  • Always back up your website files before making significant changes.
  • Ensure proper file permissions for security (e.g., folders: 755, files: 644).
  • Use file compression when transferring multiple files to save time and bandwidth.
  • Utilize reliable text editors and avoid modifying critical parts of your code unnecessarily.

This lesson has provided a detailed guide on managing your website files using both cPanel’s File Manager and FTP – including how to change permissions, compress/decompress files, and edit them.

這篇文章有幫助嗎? 0 用戶發現這個有用 (0 投票)