Knowledge Base

How to use the editors in cPanel's File Manager

This article describes how to use cPanel's editors to view and edit files directly on the web server.

The File Manager editors

When you edit a file using cPanel's File Manager, you can make immediate changes to your web site without the need to upload a new version of the file. cPanel has three editors that you can use to edit files directly on the web server:

  • A plain text editor for editing text files. This editor is intended for use with plain text files, such as configuration files.
  • A Code Editor for editing files that contain code. This editor is intended for use with PHP files, JavaScript files, CSS files, and so on. It provides common code editing features such as syntax highlighting and line numbering.
  • An HTML Editor that is intended for use with HTML files. This editor provides WYSIWYG (What You See Is What You Get) functionality. It provides many of the features that users of word processing programs are familiar with, such as spell check, formatting toolbars, and so on.

Additionally, if you just want to view a file's contents, you can do so without opening the file in an editor.

Viewing a file

You may not always need to edit a file. If you just want to take a quick look at a file's contents, you can view it without opening an editor.

To view a file in File Manager, follow these steps:

  1. In the File Manager main window, select the file that you want to view.
  2. Click the View icon. The file's contents appear in a new page.

Editing a file using the plain text editor

To edit a plain text file, follow these steps:

  1. In the File Manager main window, select the file that you want to edit.
  2. Click the Edit icon.
  3. Select the character set encoding that the file uses. The default is utf-8 (Unicode).
    Make sure that you select the correct character encoding for the file. Otherwise, the file may become corrupted.
  4. Click Edit. The file's contents appear in a new page, ready for editing.
  5. To save your changes, click Save Changes.
  6. To close the editor, click Close.

Editing a file using the Code Editor

To edit a file by using the Code Editor, follow these steps:

  1. In the File Manager main window, select the file that you want to edit.
  2. Click the Code Editor icon.
  3. Select the character set encoding that the file uses. The default is utf-8 (Unicode).
    Make sure that you select the correct character encoding for the file. Otherwise, the file may become corrupted.
  4. Click Edit. The file's contents appear in a new page, ready for editing.
  5. To save your changes, click Save Changes.
  6. To close the Code Editor, click Close.

Editing a file using the HTML Editor

To edit a file by using the HTML Editor, follow these steps:

  1. In the File Manager main window, select the file that you want to edit.
  2. Click the HTML Editor icon.
  3. Select the character set encoding that the file uses. The default is utf-8 (Unicode).
    Make sure that you select the correct character encoding for the file. Otherwise, the file may become corrupted.
  4. Click Edit. The file's contents appear in a new page, ready for editing.
  5. To change the formatting, use the formatting toolbar. For example, you can change the font size and text alignment, add bulleted and numbered lists, and much more.
  6. To view the web page's HTML source code, click Source at the bottom of the editor window.
  7. To preview the web page, click Preview at the bottom of the editor window.
  8. To save your changes, click the Save icon.
  9. To close the HTML Editor, click the Cancel icon.