Skip to main content

How to edit files in cPanel

Use File Manager in cPanel to edit files directly from your browser. This guide shows how to open and edit files on your website.

Overview

File Manager contains a built-in text editor that allows you to edit files without using external applications.

This is useful for:

  • PHP files

  • HTML files

  • CSS files

  • Configuration files

  • Text files


Important information

⚠️ Always make a backup before editing important files.

⚠️ Files larger than 1 MB cannot be edited directly in File Manager.


Prerequisites

Before you start, make sure you:

  • Have access to cPanel

  • Are logged into cPanel


Step 1: Log in to cPanel

If your hosting service supports direct login to cPanel, you can log in via the client area.

This is how you do it:

  • Find your hosting service under active products/services

  • Click on Log in on cPanel

  • You are now automatically logged into cPanel


Step 2: Open File Processing

Go to the Files section and click on File Manager:


Step 3: Find the file

Navigate to the file you want to edit.

In this example, we will edit the file script.php:


Step 4: Open the editor

  1. Select the file

  2. Click on Edit

Scroll down to the character coding options. The system can ask you to confirm character coding before the file opens. Confirm the character coding and click on Edit:


Step 5: Edit the file

3. Make the desired changes

4. Click on Save Changes

The changes are saved immediately on the server.


Troubleshooting

The file shows unreadable signs

This is often due to incorrect character coding.

Close the editor without saving and reopen the file with the correct character encoding.

I can't edit the file

Make sure that:

  • The file is less than 1 MB

  • You have the necessary file rights


Summary

You have now learned how to edit files directly in cPanel.

Did this answer your question?