InMotion Hosting Support Center

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?.

Support Center Login

Social Media Login

   
Social Login Joomla

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)
Staff
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
n/a Points
2015-01-30 5:23 pm

when i put the quicktime code in my microsoft front page source code area  the writing appears on the htm page as well as the source page

Staff
26,266 Points
2015-01-30 5:28 pm
Hello James,

Thanks for the question. Quicktime is generally a video protocol from Apple. It's not something you can edit in FrontPage. You would need to have a video editor that can work with quicktime in order to edit it. I hope this helps to answer your question, please let us know if you require any further assistance.

What is Quicktime?

Regards,
Arnel C.
n/a Points
2015-02-12 12:38 am

I am newbee for PHP. I want to edit my website which was previously developed by a professional. I am trying to find the database file of my website in public_html. How to find it? Please help.. Thanks!!!

Staff
17,917 Points
2015-02-12 12:55 pm
Hello Amar,

Thank you for your question. Your database information will be listed in your configuration file, which will differ based on the software you are using.

You will need to locate your config file, which will list your database name and user information.

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2015-04-28 4:44 am

Hi,

Does notepad++ have the abilty to test the amended php before its uploade and over writes the php file on the sever?

Staff
29,167 Points
2015-04-28 10:00 am
Hello John,

No, notepad does not have that ability as php is interpreted by the web server software. You can, however, set up a WAMP on your local machine, allowing your PC to act as a webserver. This way you can test php files prior to uploading. Alternatively, you can simply rename the file on the server by appending .hold or something else and then upload the new file. This way it does not overwrite and you can simply delete the new file if it is not working and rename the old file back.

Kindest Regards,
Scott M
n/a Points
2015-05-13 7:40 pm

Is there a way to download or sync ALL folders & files to FTP.

I am using Core FTP LE - which I believe is set up correctly, but it doesn't show all folders, only:

<..>

..

.ftpquata

 

Is my FTP set up incorrectly or am I missing something (mentally)? 

Thank you so much, in advance!

Staff
17,917 Points
2015-05-14 10:39 am
Hello Alexandra,

Thank you for contacting us. When you create an FTP account, the Directory, and Quota are also set.

It is limited to the directory you set there. To give them full access to your file system, just enter a forward slash, like this: /

Thank you,
John-Paul
n/a Points
2015-06-12 10:26 pm

Hi!

I am new to cPanel and php.  I am wanting to make a few changes to some forms on our site.  When I log on to the developer site and right click on the form element and select "inspect element"  I can see html code in the console but when I go to the file manager in cPanel and click on the exact same file, the html tags arent' there.  Should I be looking somewhere else?  Help! lol

Sincerely, Brandi B.

Staff
29,167 Points
2015-06-15 1:14 pm
Hello Brandi,

Many Content Management Systems (CMSes) are written in PHP. PHP is then interpreted by the server and the output is HTML. This is why you see HTML in the browser and can see HTML code when you View Source or Inspect Elements. The actual files on the server, however, are PHP and look different. You can still find the place in the PHP file that prints the HTML to the browser, but it is usually among other PHP code as well, so finding it is not as easy as with a normal HTML page.

Kindest Regards,
Scott M

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

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

14 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

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: support@InMotionHosting.com
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!