How to Use the Code Editor in the cPanel File Manager

Editing code on your website is an inevitable event. If you have minor changes to make on your website that can be done simply, you can use the code editor in the cPanel File Manager to change the code. This is called “Editing on the fly“, which is changing the files of the source website while its live. Let’s go to cPanel File manager and see how this editor works.

Important! Editing the code in a file on the server can break your website. Because the file is being used by the live website, we always recommend editing a backup copy of your site instead of the files on the server. Make a backup copy of the file before editing it by saving the file as a different name.

Using use the Code Editor in cPanel

  1. Cpanel home pageLogin into your cPanel.
  2. File manager cpanelGo to the File Manager.
  3. Select teh file and click code editorNavigate to the page you want to edit. Select the file and click code editor.
    Now you should see the basic code editor interface.This is where you can add code or change code in your file.

    When you are done making the changes, you can click Save Changes at the top right. Otherwise, click cancel.

    The code editor has the following features.

    Code editor properties
    Editing: This is the path to the file location of the file you are editing.
    Line numbering Code editor will place all code in lines for an easier time in locating lines of code.
    Find and Replace Find and Replace box code editorBy entering Ctrl + F on your keyboard at the same time, the find and replace box shows. This is handy for making multiple changes to the same code.
    Highlighted code The code highlighter can be turned on or off. The color coding helps find blocks of code of the same code type easier. This can be turned off.
    Use Text editor This allows the interface to switch back and forth from the text editor to the code editor.
    Encoding Encoding selection code editor cpanelThe encoding drop box allows the page encoding type to be changed on the server. This is useful for foreign language sites or other programming code requirements.

Leave a Reply