Creating and editing a file via FTP

Overview

DreamHost offers a built-in FTP client in the panel. View the following article for further details:

You can use an FTP client to create and edit files for your website. This is an easier way to create and edit files compared to using the command line. You can use any FTP client you like, but this article uses the FTP client Filezilla. Visit the following page to download this free program:

If you'd like instructions on how to edit a file via SSH, please view the following article:

What does this article cover?

This article only gives you an example of how to create and edit a file using an FTP client.

The file created is named .htaccess, but you can create any file you like.

This article DOES NOT tell you what to put in the file.

When following these instructions, make sure to choose your actual file and edit it with whatever contents you need.

Creating a file

Follow all steps below to log into your server and create a file.

  1. View the FTP overview article to log into your server using an FTP client.
  2. Make sure your client is configured to show hidden files.
    Filezilla editing.png
  3. Once you're logged in, confirm you're in the correct directory to create the file. You can see the directory in the right pane. It's a field titled Remote site. In this example, the directory is /home/example_username/example.com.
  4. Right click and choose Create new file.
    Filezilla editing.png
  5. A prompt appears for you to enter the name of the file. In this example, a file named .htaccess is being created. Click the OK button to save.
    Filezilla editing.png
  6. You can now see the empty file exists on the server.

Editing a file

Follow all steps below to edit an existing file.

  1. View the FTP overview article to log into your server using an FTP client.
  2. Once you're logged in, confirm you're in the correct directory to create the file. You can see the directory in the right pane. It's a field titled Remote site. In this example, the directory is /home/example_username/example.com.
    Filezilla editing.png
  3. Right click the file and choose View/Edit.
    Filezilla editing.png
  4. A prompt displays asking you to choose a text editor. You can choose a specific editor you've already installed, but the easiest option is to use the default editor.

    For Windows, this program is Notepad.

    For Mac, this program is TextEdit.

    Filezilla editing.png
  5. Add any text necessary to the file.
    Filezilla editing.png
  6. When finished, click File > Save.
    Filezilla editing.png
  7. A prompt displays. Check the box and click Yes.

The file is now updated on your web server.

Deleting a file

To delete an existing file:

  1. View the FTP overview article to log into your server using an FTP client.
  2. Once you're logged in, make sure you're in the same directory as the file.
    You can see the directory in the right pane. It's a field titled Remote site:
    Filezilla editing.png
  3. Right-click the file and choose Delete.
    Filezilla editing.png
  4. If the FTP client asks you to confirm the action, as shown above, click Yes to delete the file.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?