How to Edit HTML Code in cPanel

Learn how to edit HTML code in cPanel

It’s inevitable that you will have to edit HTML code for your website. Maybe you need to update the path for an image or change the paragraph text on your website, for example. If you have minor changes to make that can be done quickly, you can use the HTML 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 it’s live. Let’s go to the File Manager and see how this cPanel code editor works.

Important! Editing the code in a file on the server can break your website if you do not know what you are doing. Because the file is being used by the live website, we always recommend editing a backup copy of the file instead of the files on the server. Make a backup copy of the file before editing it by right-clicking the file, selecting the Copy option, then entering a new file location. You can also edit a file using FTP, or create a clone of your site for testing using Softaculous.

Edit HTML Code in cPanel

  1. Login to your cPanel.
  2. Go to the File Manager in the Files section.
    Edit Website Files with cPanel File Manager
  3. Navigate to the HTML page you want to edit.
    Open the Folder that Contains the File You Want to Edit
  4. Right-click the file and choose the HTML Edit option. You can also select the file and click the HTML Editor link on top.
    Edit HTML File - Right-Click Menu
  5. Now you should see the HTML Editor interface. You can make changes to the page using the visual editor and top toolbar.
    Using the Visual HTML Editor in cPanel
  6. You can also click the Source button to add code or change code in your file.
    Edit HTML Code - View Source
  7. If you see a pop-up message, read the warning then click the Edit button.
    Edit HTML Code - Encoding
  8. When you are done making the changes, you can click Save on the top left.
    Edit HTML Code - Saving Changes

HTML Editor Features

Now that you know how to use the HTML editor in the cPanel File Manager, we will go over the features that are included.

ToolDescription
Text EditorThis is the actual place where the editing occurs. This is the main view of the HTML Editor.
HTML Text Editor
Paste ToolsThese tools can be used to insert or paste it into the cPanel code editor. This can save you time when you are copying text from another location or moving text around the page.
HTML Editor Paste Tool
Find & Replace ToolsThese buttons can be used for locating specific lines of code or text and replacing them with different text. This is handy for making multiple changes to the same code.
Access the Find & Replace Tool
Element Buttons
Text/Styling ToolsThe text and styling tools are used for customizing text. For example, you can choose a “Header 1” option to insert a header on the page. Then change the font and size of the paragraph content contained on the page.
Tools for Text Styling
Link/Anchor ButtonsYou can use the link button for easily creating hyperlinks to other pages or sites. The Anchor buttons can be used to link to a specific section of a page.
Link Anchor Tool Buttons
Media/Special Character ButtonsThese buttons can help you add components to your web page. For example, you can easily insert images, embed media, add tables, and special characters.
Insert HTML Page Elements

Also, keep in mind that you can click the Source button at any time to edit the code directly, without using the toolbar.

Edit HTML Source Code

Now you know how to edit HTML code in cPanel! You can begin making changes to your website on the fly. Check out our cPanel Education Channel for more helpful tutorials.

Secure VPS HostingEnjoy high-performance, lightning-fast servers with increased security and maximum up-time with our Secure VPS Hosting!

check markLinux VPS check markcPanel or Control Web Panel check markScalable check markWebsite Migration Assistance

Linux VPS Hosting

JB
John-Paul Briones Content Writer II

John-Paul is an Electronics Engineer that spent most of his career in IT. He has been a Technical Writer for InMotion since 2013.

More Articles by John-Paul

4 thoughts on “How to Edit HTML Code in cPanel

  1. Two questions:
    Is source code & HTML the same thing?
    I want to access my source code for my WP website and add a canonical tag, is this what I need to do? e.g click source then add the canonical tag.

    Thank you for any response in advance.

  2. I was able to edit a web page and save the changes, but still need to know how to get the revised page on the internet.
    Thanks

    1. Hello Jay – Most likely your old page is cached in your browser. Simply clear the cache (https://www.inmotionhosting.com/support/website/how-to-clear-browser-cache-for-major-browsers/) and you should see your changes.

Was this article helpful? Join the conversation!