Yes, you can use your local machine text editor such as Visual Studio Code, Sublime Text, Panic Code, etc to edit your website files.

But cPanel also provides a way to get that done in-browser.

We are assuming that you have successfully created a new web hosting account.

We also assume that you have logged in to your brand-new cPanel hosting panel interface.

With these done, scroll to the Files section and click on the File Manager icon.

Once the page (which will load in a new tab) opens, navigate to the folder where the file is located.

Click on the file's name.

Click on the Edit icon to open the Edit window.

Click Edit to open a new window with the content of the file displayed.

Make your changes and click Save Changes on the top toolbar.

 

 

To do this using the command-line:

vi | vim | nano $filename

 

If you want to just delete specific lines from a text file, you can use the powerful sed command line editor and delete lines that match a specific rule.

For instance, let's say you want to delete the 20th line number in a file named contact.php:

sed -i '20d' contact.php

 

To delete the last line in this file:

sed -i '$d' contact.php

 

To delete a multi-line:

sed -i '10,55d' contact.php

Was this answer helpful? 0 Users Found This Useful (0 Votes)