Many times, when you are configuring your website, you will need to edit a file on the server. There are many ways you can edit a file on your server. You can use the File Manager Code Editor, an FTP program, or a program like Notepad++ to edit your files. The following will explain the steps on how to edit a file on your server.

Important! When updating files on your server, you may need to clear your browser cache to see the changes. For more information on clearing your browser cache, please see the article on How to clear your browser's cache.

Use the file manager in cPanel

You can edit files directly on your server using the File Manager code editor. This is sometimes called "Editing on the fly". Editing on the fly is usually reserved for minor changes. When editing files directly on the server, the change takes effect immediately. The problem with editing files directly on the server is that you are editing the live copy. When editing the live copy, your site can break if a mistake happens and you cannot undo the change after its saved.  In order to edit a backup copy of your files, you will want to use FTP to change the files. Below is a general step by step on how to edit files though the File Manager.

NOTE!! If you do not know where your files are located on the server, please see our article on What directory should I put my files in?.

  1. Login into your cPanel and Go to the File Manager in cpanel. Select your directory and click Go.
  2. Edit the file with the File Manager Code Editor.

    Save the changes.

    You can now view your live site and see the changes.

Using FTP to edit a file

Files can be downloaded and uploaded using FTP. Below are the basic steps to edit a file using FTP. For more information on FTP, please see our Getting Started Guide: FTP article.

  1. Connect with ftp.
  2. Download the file
  3. Edit the file on your computer with notepad or another code editor.
  4. Re-upload the file to the server and overwrite the existing file.

    The changes should reflect now on your live site.

Connect with a program like Notepad++

You can edit files directly on your server using Notepad++. NotePad++ is a Windows based program that has FTP capabilities. For information on on editing your files with Notepad++, please see the article on Connecting to your server with Notepad++.

To see other articles available on how to manage your files, please visit How to manage your files on your server?.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Support Center Login

Social Media Login

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
2013-11-26 7:18 pm
why does the code editor or the html editor won´t let me edit public_html ? is because it is a directory or is it because of it´s size?
how can i edit public_html? (want to ad a favicon)
9,968 Points
2013-12-04 6:10 pm
Hello irenioskamoska,

The /public_html directory can't be edited with a code-editor as it is a folder and not a file. You can read our guide on how to create a favicon for your website for steps on setting up a favicon.

Please let us know if you had any other comments or questions.

- Jacob

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

2 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!