cPanel File Manager includes a built-in text editor that lets you edit files directly on the server without needing to download and re-upload them. This is useful for making quick changes to configuration files, PHP scripts, HTML pages, and more. This guide covers how to use the editor safely.

Opening a File in the Editor

  1. Log in to your cPanel account.
  2. Go to FilesFile Manager.
  3. Navigate to the directory containing the file you want to edit.
  4. Click on the file name once to select it.
  5. Click Edit from the toolbar at the top, or right-click the file and choose Edit.
  6. A dialog box will appear asking you to confirm the character encoding. Leave it set to utf-8 unless your file uses a different encoding.
  7. Click Edit to open the file in the editor.

Using the HTML Editor

For HTML files, you can use the built-in HTML Editor which provides a visual editing experience:

  1. Select the HTML file and click HTML Editor instead of Edit.
  2. Choose the character encoding and click Edit.
  3. The HTML Editor provides a WYSIWYG (What You See Is What You Get) interface where you can format text, insert links, add images, and more.

Making and Saving Changes

  • Edit the file content directly in the editor window.
  • The toolbar at the top of the editor includes options for:
    • Search: Find text within the file.
    • Go to Line: Jump to a specific line number.
    • Undo / Redo: Reverse or reapply changes.
    • Wrap text: Toggle text wrapping for long lines.
  • When you are finished, click Save Changes in the top-right corner.
  • A confirmation message will appear at the bottom of the page.
  • Click Close to return to File Manager.

Editing Hidden Files

Files starting with a dot (like .htaccess) are hidden by default in File Manager:

  1. In File Manager, click Settings in the top-right corner.
  2. Check the box for Show Hidden Files (dotfiles).
  3. Click Save.
  4. Your hidden files will now be visible and editable.

Common Files You May Need to Edit

  • .htaccess — Apache server configuration for redirects, rewrites, and security rules.
  • wp-config.php — WordPress database and configuration settings.
  • php.ini — PHP configuration (if a local copy exists in your account).
  • index.html / index.php — Your website homepage.
  • robots.txt — Search engine crawling instructions.

Important Notes

  • You cannot edit files larger than 1 MB through the cPanel editor. For larger files, download them and use a local editor.
  • Always back up a file before editing it. You can copy the file to a backup name (e.g., .htaccess-backup) before making changes.
  • Choosing the wrong character encoding can corrupt your file. If the file displays as garbled characters, do not save — close the editor and try again with the correct encoding.
  • Changes take effect immediately after saving. Be careful when editing live files.

Troubleshooting

"Edit" button is grayed out:

  • Make sure you have clicked on the file name (not the checkbox) to select it.
  • Some file types cannot be edited this way. Try downloading and editing locally instead.

File appears garbled after opening:

  • The wrong character encoding was selected. Close the editor without saving and reopen with the correct encoding.
  • If the file is a binary file (images, compiled files), it cannot be edited as text.

Changes are not appearing on the website:

  • Clear your browser cache and reload.
  • If using Cloudflare or a CDN, purge the cache.
  • Verify you edited the correct file in the correct directory.
Was this answer helpful? 0 Users Found This Useful (0 Votes)