Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

FTP and Web Deployment

Lesson 33 of 34 in the free Web Technologies notes on Siksha Sarovar, written by Rohit Jangra.

FTP and Web Deployment

What is FTP?

FTP (File Transfer Protocol) is a standard network protocol used to transfer files between a client and a server. It operates on port 21 (control) and port 20 (data).

  • FTP – unencrypted (avoid for production)
  • FTPS – FTP over SSL/TLS
  • SFTP – SSH File Transfer Protocol (secure, recommended)

FTP Workflow

FTP Clients

ClientPlatform
FileZillaWindows/Mac/Linux
WinSCPWindows (SFTP/FTP)
CyberduckMac/Windows
cPanel File ManagerBrowser-based
CLI (sftp, ftp)Terminal

FileZilla Usage

Host: ftp.yourdomain.com
Username: yourftpuser
Password: ********
Port: 21 (FTP) or 22 (SFTP)

Command-Line FTP/SFTP

# Connect via SFTP
sftp user@server.com

# Common SFTP commands
ls          # list remote files
lls         # list local files
pwd         # remote directory
lpwd        # local directory
cd /public_html   # change remote dir
put index.html    # upload file
get data.xml      # download file
put -r ./website/ # upload directory recursively
quit

Web Deployment Methods

1. Manual FTP Upload

  • Upload files via FTP client
  • Simple but error-prone
  • Best for: Small static sites

2. Git-based Deployment

# Deploy to server via git
git push origin main

# Webhooks or CI/CD triggers deployment on server

3. CI/CD Pipeline (GitHub Actions)

name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Deploy via FTP
        uses: SamKirkland/FTP-Deploy-Action@v4.3.4
        with:
          server: ftp.example.com
          username: ${{ secrets.FTP_USER }}
          password: ${{ secrets.FTP_PASS }}

4. cPanel File Manager

  • Browser-based file manager provided by hosting
  • Upload ZIP files and extract
  • Good for non-technical users

5. Static Site Hosting (Netlify/Vercel)

# Netlify CLI
npm install -g netlify-cli
netlify deploy --prod --dir=build

# Vercel CLI
npx vercel --prod

Web Server Document Root

ServerDefault Root
Apache/var/www/html
Nginx/usr/share/nginx/html
cPanel/home/user/public_html
Key Takeaway: Use SFTP instead of FTP for secure file transfer. For modern projects, automate deployment with Git-based CI/CD pipelines (GitHub Actions, GitLab CI) rather than manual FTP uploads.