How to Edit a File on My Server

Many times, when you are configuring your website, you will need to edit a file on the server. There are many ways you can do this. You can use the cPanel File Manager Editor, an FTP program, or a program like Notepad++ to edit files. In this guide, you can learn the steps for how to edit a file on your server.

Use the File Manager in cPanel

You can edit files directly on your server using the File Manager 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.

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

Thoughts on “How to Edit a File on My Server

  • Why is it that when I try to edit some html files in file editor, the editor is greyed out or not active while others can be edited.

    • I looked at the page as well and I’m not sure that you didn’t change more than just the phone number. Are you able to change it back and see the page work? Or do you have a backup of the old file? If the issue repeats after returning it to the original file, then there’s something else causing the issue. You may need to speak with an experienced programmer to investigate the issue.

  • Hi support,

    1. in the physical website I can view and see my coding but when I am using the      wordpress editior, I am not able to view the coding

    2. how do you locate the file name in ftp for example in my wordpress my webpage file name is PROMOTION1 but in ft how do I locate this file. I know it is under theme folder but I could not find

    thanks hope to get your support soon

    • Thats not how WordPress works. Pages in WordPress aren’t created as files. WordPress is a dynamic content management system and stores pages and its data within a database.

    • Yes, this could be the issue. As a test, you can try using your Shared IP as your hostname. This will ensure you are connecting to the correct server.

      Thank you,

    • I advise you take a look at some online courses or something like Codecademy. This is a help forum, but we cannot provide individual tutoring or something like code education. Best of luck to you!

  • Hi, 

    i was asked to do some changes on an existing webpage.

    i have connected to the ftp server via dreamweaver, downloaded all the ebpage content. did changes and uploaded back.

    but, the problem is, when i visit the webpage via web browser, i dont see any updates.

    plz help 


    • You may need to clear your web browsers cache. I suggest doing that. If that doesn’t work, I would check to be sure the files are uploaded in the correct location.

  • I’m looking for mass css files minifier running on Server.

    Is there some tool that can minify mass css while on server? In my Joomla there are some plugins but I’d like do it oneces with no weight of plugin that constantly optimize web.

    or soe reg expression that I can open in ftp client with searching all css files…

    by ******.org

    • Hello Niepelnosprawny,org,

      Thanks for the question about a CSS minifier. There are many online minifying tools. I would suggest using a search engine to look at current results for minifiers as there are too many to sort out. Check out this command line minifyer as an example what you might find. If you have any further questions or comments, please let us know.

      Arnel C.

  • Hi guys

    Im trying to edit my .htaccess file on the cpanel server but it wont allow me. I tried to download the file but because its a hidden file its difficult to locate, then i tried using notepad++ but it failing to log i. Im also using clod duck to upload ftp files but iIm failling to edit the hidden file 

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

  • 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

    • 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

  • 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

    • 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

  • Okay we made a page for our site by a professional and we go a, 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  

    • 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,

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

    • 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,

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

    • Hello Arundhati,

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

      Kindest Regards,
      Scott M

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

    • 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

  • 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:





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

    Thank you so much, in advance!

    • 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,

  • Hi,

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

    • 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

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

    • 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,

  • 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

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

      Arnel C.

Leave a Reply to InMotionFan Cancel reply