FTP Zip Deploy
Deploy files and folders to remote servers via SFTP with automatic zip compression and extraction.
通过 SFTP 将文件和文件夹部署到远程服务器,支持自动压缩和解压。
Demo

中文文档 | English
English
Introduction
FTP Zip Deploy is a VSCode extension that simplifies the deployment process by compressing your local files into a zip archive, uploading it to a remote server via SFTP, and automatically extracting it. This approach is significantly faster than uploading files one by one, especially for projects with many small files.
Features
- 📦 Smart Compression: Automatically compress files/folders into zip format before upload
- 🚀 Fast Deployment: Upload single zip file instead of thousands of individual files
- 🔧 Server Management: Manage multiple server configurations in the sidebar panel
- 🎯 Context Menu Integration: Deploy directly from the Explorer context menu
- 📝 Ignore Files Support: Use
.zipignore
to exclude files from compression
- 🔄 Auto Extract: Automatically extract zip file on the remote server after upload
- 🗑️ Clean Deploy: Clear target directory before extraction to ensure clean deployment
Usage Scenarios
- Frontend Projects: Deploy React, Vue, Angular, or other frontend build outputs
- Static Sites: Deploy static websites, documentation, or HTML pages
- Quick Updates: Rapidly deploy entire project folders to development/staging servers
- CI/CD Integration: Use in automated deployment workflows
- Multi-Server Management: Manage and deploy to multiple environments (dev, staging, production)
How to Use
1. Add Server Configuration
- Click the FTP icon in the Activity Bar to open the sidebar panel
- Click the "Add" button in the panel
- Fill in the server information:
- Host: Server IP address or domain name
- Port: SSH port (default: 22)
- Username: SSH username
- Password: SSH password
- Remote Path: Target directory on the server (e.g.,
/var/www/html
)
- Click "Save" to add the server configuration
2. Deploy Files/Folders
- In the Explorer, right-click on any file or folder you want to deploy
- Select "FTP Zip Deploy" from the context menu
- A list of configured servers will appear
- Click on the target server to start deployment
3. Use .zipignore (Optional)
Create a .zipignore
file in any directory to exclude specific files or folders from compression:
node_modules/
.git/
*.log
.env
The .zipignore
file follows the same pattern syntax as .gitignore
.
Deployment Process
- 📁 Read
.zipignore
and collect files to compress
- 🗜️ Compress selected files into a temporary zip archive
- 📤 Upload zip file to remote server via SFTP
- 🗑️ Clear all contents in the target directory on the server
- 📦 Extract zip file using the
unzip
command on the server
- ✅ Deployment complete!
Notes
- Only password-based authentication is supported (SSH key authentication is not supported)
- The remote server must have the
unzip
command installed
- The target directory will be cleared before extraction - use with caution!
中文文档
简介
FTP Zip Deploy 是一个 VSCode 扩展,通过将本地文件压缩为 zip 包、上传到远程服务器并自动解压的方式,简化了部署流程。这种方式比逐个上传文件要快得多,特别是对于包含大量小文件的项目。
功能特性
- 📦 智能压缩:自动将文件/文件夹压缩为 zip 格式再上传
- 🚀 快速部署:上传单个 zip 文件而非数千个单独文件
- 🔧 服务器管理:在侧边栏面板中管理多个服务器配置
- 🎯 右键菜单集成:直接从资源管理器右键菜单部署
- 📝 忽略文件支持:使用
.zipignore
排除不需要压缩的文件
- 🔄 自动解压:上传后自动在远程服务器上解压 zip 文件
- 🗑️ 清空部署:解压前清空目标目录,确保部署环境干净
使用场景
- 前端项目部署:部署 React、Vue、Angular 等前端项目的构建产物
- 静态网站:部署静态网站、文档站点或 HTML 页面
- 快速更新:快速将整个项目文件夹部署到开发/测试服务器
- CI/CD 集成:在自动化部署工作流中使用
- 多服务器管理:管理并部署到多个环境(开发、测试、生产)
使用方法
1. 添加服务器配置
- 点击活动栏中的 FTP 图标打开侧边栏面板
- 点击面板中的 "添加" 按钮
- 填写服务器信息:
- 主机地址:服务器 IP 地址或域名
- 端口:SSH 端口(默认:22)
- 用户名:SSH 登录用户名
- 密码:SSH 登录密码
- 远程路径:服务器上的目标目录(例如:
/var/www/html
)
- 点击 "保存" 添加服务器配置
2. 部署文件/文件夹
- 在资源管理器中,右键点击要部署的文件或文件夹
- 从右键菜单中选择 "FTP 解压部署"
- 会弹出已配置的服务器列表
- 点击目标服务器开始部署
3. 使用 .zipignore(可选)
在任意目录下创建 .zipignore
文件,排除特定文件或文件夹不被压缩:
node_modules/
.git/
*.log
.env
.zipignore
文件使用与 .gitignore
相同的模式语法。
部署流程
- 📁 读取
.zipignore
并收集需要压缩的文件
- 🗜️ 将选中的文件压缩为临时 zip 包
- 📤 通过 SFTP 上传 zip 文件到远程服务器
- 🗑️ 清空服务器上目标目录的所有内容
- 📦 在服务器上使用
unzip
命令解压文件
- ✅ 部署完成!
注意事项
- 仅支持密码方式登录(不支持 SSH Key 认证)
- 远程服务器必须安装
unzip
命令
- 解压前会清空目标目录 - 请谨慎使用!