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
- Login to your cPanel.
- Go to the File Manager in the Files section.
- Navigate to the HTML page you want to edit.
- Right-click the file and choose the HTML Edit option. You can also select the file and click the HTML Editor link on top.
- Now you should see the HTML Editor interface. You can make changes to the page using the visual editor and top toolbar.
- You can also click the Source button to add code or change code in your file.
- If you see a pop-up message, read the warning then click the Edit button.
- When you are done making the changes, you can click Save on the top left.
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.
Tool | Description |
---|---|
Text Editor | This is the actual place where the editing occurs. This is the main view of the HTML Editor. |
Paste Tools | These 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. |
Find & Replace Tools | These 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. |
Element Buttons | |
Text/Styling Tools | The 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. |
Link/Anchor Buttons | You 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. |
Media/Special Character Buttons | These buttons can help you add components to your web page. For example, you can easily insert images, embed media, add tables, and special characters. |
Also, keep in mind that you can click the Source button at any time to edit the code directly, without using the toolbar.
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.
Enjoy high-performance, lightning-fast servers with increased security and maximum up-time with our Secure VPS Hosting!
Linux VPS cPanel or Control Web Panel Scalable Website Migration Assistance
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.
Yes, source code and HTML code refer to the same thing. But keep in mind that WordPress is PHP powered and to avoid issues with directly adding code to the site, I recommend using a plugin that can assist with adding canonical URLs. Most SEO plugins can help you accomplish this, for example, the following have the ability to manage canonical URLs:
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
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.