Files

A project's Files section is a file manager for the project's directory on the server. Browse, open and edit files, upload and extract archives, download files or whole folders, and restore what was deleted or overwritten in the last 7 days.

Open the project and pick Files under Run in the menu beside the page. Files is available on every plan.

Who can use it #

RoleBrowse, open, downloadChange files
Owner, Admin, DeveloperYesYes
ManagerYesNo
ViewerNoNo

Browsing needs file:read; editing, uploading, extracting, moving, copying, deleting, changing permissions or ownership, and WordPress installs need file:write. A role without file:write sees the files read-only.

.env files open read-only and point to the Env section, where every change is versioned. Reading them needs project:update.

API tokens created with a specific permission list need file:read and file:write added to reach the Files endpoints. See API Tokens.

Where you are, and what survives a deploy #

On a zero-downtime project, Files opens in current, the release that is live now. What you change there is in the running site at once, but the next deploy replaces the release. A banner above the list says so:

Files here come from your latest deploy and are replaced by the next one. Put files that must survive a deploy in shared/.

  • shared/ keeps its files across deploys. It holds .env, Laravel’s storage/ and any persistent files you declared. Put uploads and other files the app writes here.
  • Previous releases under releases/ are read-only.
  • current, releases, shared and the release folders cannot be deleted or renamed.
  • While a deployment runs, editing the live release is paused until it finishes.

On a project deployed in place from a repository, the whole project directory is editable, and files tracked in your repository are reset on the next deploy.

When the project has a root directory, Files works in the app’s folder.

The toolbar #

Above the file list, from left to right:

  • the path, starting from Project root — click a part to go back up
  • New File, New Folder and Upload (for roles that can change files)
  • Search — finds files and folders by part of the name in the current folder and below
  • Trash — see Restore from the trash
  • Refresh
  • … — Folder size, Download folder as zip, Open terminal here and Fix ownership of this folder

Open terminal here opens a terminal session in that folder. It shows for roles that can open a terminal: Owner, Admin and Developer.

Working with files #

Each row’s … menu holds the actions that apply to it: Open, Download, Download as zip, Rename, Move, Copy, Compress, Extract, Change permissions, Fix ownership, Folder size, Open terminal here and Delete.

Select rows with their checkboxes to Download, Move, Copy, Compress or Delete several at once.

Change permissions takes an octal mode such as 644. Delete moves the selection to the trash.

Symbolic links that point inside the project open like any file or folder. A link that points outside the project directory is listed but cannot be opened.

The editor #

Open on a text file opens it in the editor, for files up to 2 MB. A file that is not UTF-8 text, or larger than that, can be downloaded instead.

  • Saving a .php file runs php -l first. A syntax error blocks the save and shows the line.
  • If the file changed on the server after you opened it, the save stops with This file changed on the server and three choices: Reload from server, Overwrite, or Save as a copy.
  • The version before each save goes to the trash, so a bad save can be undone.

Upload and extract #

Upload, or drop files onto the list, uploads into the current folder; files up to 1 GB each. If a file with the same name exists, you choose Replace, Keep Both or Skip. Folders cannot be uploaded directly: compress the folder into a .zip, upload it and choose Upload and extract.

When you upload a .zip, Depfloy asks what to do with it:

  • Upload as file — stores the .zip without unpacking it.
  • Upload and extract — unpacks it into a new folder named after the archive. A number is added if that name is taken.
  • Install as plugin or theme — on WordPress projects. Depfloy reads the plugin or theme header first and asks before writing to wp-content, then installs or updates it with WP-CLI.

Extract on a .zip already on the server unpacks it Here or Into a new folder. Existing files and folders with the same name as a top-level item in the archive move to the trash.

Archives up to 512 MB, and up to 2 GB once extracted, can be unpacked. Depfloy refuses an archive with absolute paths, .. in a path, symbolic links, encrypted entries, or more than 50,000 entries.

Download #

Download fetches a file of up to 2 GB. Download as zip on a folder, and Download folder as zip in the toolbar menu, prepare a zip on the server first; the zip is kept for 60 minutes. Leaving the page while a download is running cancels it.

Restore from the trash #

Trash lists what can be restored, for 7 days:

  • Deleted — files and folders deleted from the Files section
  • Previous version — the version before a save in the editor
  • Replaced — files replaced by an upload, an extract or a WordPress update

Restoring puts an item back where it was. If something already exists at that path, it is restored next to it under a new name. Delete forever removes one item, and Empty trash removes everything.

Ownership #

Files changed from the Files section are written as the server user, so PHP-FPM can write them too. A file owned by another user, for example after something ran as root, cannot be changed and is marked as such.

Fix ownership gives every file under a folder back to the server user. Use it when WordPress reports “could not create directory” after a command ran as root. Also tighten group/other write bits removes write access for the group and others at the same time.

Search and folder size #

Search and Folder size stop after 15 seconds and show what they found so far, marked as partial. Search shows up to 500 matches; use a longer name to narrow it down. Folder size counts symbolic links as links and skips other disks.

From MCP #

Assistants connected through MCP can list a project’s files with list_project_files and read one with read_project_file. open_terminal_session accepts a starting folder inside the project.