How to Create and Edit Files Online

Updated 25 February 2026 11 views FTP & File Management

Creating and Editing Files Online

The cPanel File Manager includes a built-in code editor that allows you to create and edit files directly in your browser. This is useful for making quick changes without needing to download files or use an FTP client.

Creating a New File

  1. Open the File Manager in cPanel.
  2. Navigate to the directory where you want to create the file.
  3. Click New File in the toolbar.
  4. Enter the file name including the extension (e.g., contact.html or style.css).
  5. Click Create New File.

Editing an Existing File

  1. Navigate to the file you want to edit in the File Manager.
  2. Right-click the file and select Edit for a plain text editor, or Code Editor for syntax-highlighted editing.
  3. The file will open in a new tab with the editor.
  4. Make your changes and click Save Changes.

Code Editor Features

The built-in code editor provides several helpful features:

  • Syntax highlighting – Colour-coded syntax for PHP, HTML, CSS, JavaScript, and other languages.
  • Line numbers – Easy reference for finding specific lines of code.
  • Search and replace – Find specific text within the file and replace it.
  • Encoding selection – Choose the character encoding when opening files to prevent character display issues.

Best Practices for Online Editing

  • Always back up first – Before editing any file, make a copy of the original. Right-click and select Copy to create a backup.
  • Edit one file at a time – Avoid having multiple files open for editing simultaneously to prevent confusion.
  • Test after saving – Visit your website after saving changes to verify everything works correctly.
  • Use the code editor for code – The code editor with syntax highlighting makes it easier to spot errors in PHP, HTML, and CSS files.

File Types You Can Edit

The online editor works with any text-based file including .html, .php, .css, .js, .txt, .htaccess, .xml, and .json. Binary files such as images, videos, and executables cannot be edited with the text editor.

Was this article helpful?

Let us know so we can improve our docs.