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 htaccess
  5. Enter the name of the file in the prompt that appears. In this example, a file named .htaccess is created. Click the OK button to save.
  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.
  3. Right-click the file and choose View/Edit.
    ES Filezilla view and edit
  4. Choose a text editor from the prompt that displays. 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.

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

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.
  3. Right-click the file and choose Delete.
  4. If the FTP client asks you to confirm the action, as shown above, click Yes to delete the file.

See also

DreamHost links

Third-party links

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?