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)
9,968 Points
2013-12-04 6:10 pm
<div style="background-color: #FFF; padding-left: 10px;">Hello irenioskamoska,

The <strong>/public_html</strong> directory can't be edited with a code-editor as it is a folder and not a file. You can read our guide on <a href="http://www.inmotionhosting.com/support/website/how-to/how-to-create-a-favicon-for-your-website" target="_blank">how to create a favicon for your website</a> for steps on setting up a favicon.

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

- Jacob</div>
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
31,871 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
22,444 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
36,223 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
22,444 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
36,223 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
n/a Points
2015-07-20 7:08 pm

Hello,  Thanks for the video.  It taught me soemthing, but I still am not able to figure out something in my website.  I am asking around and people trying to make me pay for full redoing of my website and expecting me to pay monthly maintenance which, I can not afford.  few months ago I could easily go into my cpanel and change the store hours, but surprisingly that has disappeared now.  I forgot to change my passwords and the person who created still had access until recently and demanding more money to change it.  Can you help?  I don't see the contact page coding anywhere in the cpanel.  Looks like it's been routed to different place to pick from and can't find it.  Any help is really appreciated.

Staff
36,223 Points
2015-07-21 7:46 am
Hello Arundhati,

I would not mind taking a look, but there is no domain name given.

Kindest Regards,
Scott M
n/a Points
2015-09-24 1:21 pm

Hello guys i new here and i want o edit my old php file suddenly i have lost some data and i want to add that back into my site's script that is a ptc sites script and countries are missing in that file so tell me how can i put countries in that file?

Staff
22,444 Points
2015-09-24 1:49 pm
Hello Hamza,

Thank you for contacting us. We are happy to help, but it is not clear what you are trying to accomplish.

Please provide more detailed information into what you are trying to accomplish.

Thank you,
John-Paul
n/a Points
2015-11-01 1:41 pm

Okay we made a page for our site by a professional and we go a css.zip, bin.zip and a html page for our letter through our mail.  Now d problem is that am confused on how to upload the page on c panel cause i was hoping to get a zip file so we could easily upload once but now am confused cause i want all pages to work fine  

Staff
22,444 Points
2015-11-02 2:48 pm
Hello Developer,

Thank you for contacting us. I'm not sure exactly what you are asking, but you can upload files to your server at any time.

You can also zip/unzip files on the server at any time.

Let us know if you have any further questions.

Thank you,
John-Paul
n/a Points
2015-11-14 9:31 pm

I'm having an issue with seeing my updates take effect.  Whether I try to update a file as shown in the video or upload and replace the file, my site does not load the changes.  This is a frustrating issue I had a couple of months ago and noticed that I could only see the changes happen when I renamed all the files completlly and uploaded them.  For example I uploaded some bmp images not knowing browsers didn't support it so I saved them as jpg uploaded them, and edited my code with the changes but when I loaded my site the images were still boken.  Can someone please help me with this.  I've tried clearing everything in my browser in case something is being cached but I'm having no luck and need this site up by Monday.  Thanks

Staff
36,223 Points
2015-11-16 3:45 pm
Hello Pedro,

Are you using some type of caching plugin? Have you tried different browsers? Different devices? It sounds as if it is some sort of caching somewhere.

Kindest Regards,
Scott M
n/a Points
2015-11-28 10:12 am

Hi -  I recently started using InMotion and am building my site on my local Host before uploading - I already have a ModX site (Php5 and Mysql) running on another webserver that I would like to port over to InMotion -  I see the Droopal and Jumula support on InMotion but am wondering whether there are any plans for InMotion to provide support for ModX Reolution in the future.

Thnaks in advance

Staff
36,223 Points
2015-11-30 6:18 pm
Hello George,

You can always ask a question about Mod X if you run across an error or need assistance. There are no current plans to create a Mod X education channel or articles, however.

Kindest Regards,
Scott M
n/a Points
2016-01-21 12:06 am

I edited my index.html file at file manager editor but why is it, it does not took effect. There is a link that I unlink and also an image i delete. But when i hit save and browse my site, it is still not changing. the link and the image is still there. what is the cause of this issue?

Staff
22,444 Points
2016-01-21 3:03 pm
Hello ayan,

Thank you for contacting us. You may have to clear your browser cache before testing, or test with a different browser to see the changes.

Thank you,
John-Paul

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.

26 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!