✅ 1. SFTP Setup (File Access)
Requirements
Host login (cPanel or panel)
SFTP username & password
SFTP port (usually 22)
Steps
- Install FileZilla / WinSCP
- Enter:
Host: yourdomain.com
Username: provided by host
Password: provided by host
Port: 22
- Click Connect
- You will see WordPress files like:
wp-content
wp-admin
wp-config.php
📌 You now have secure file access to upload, edit, backup, or fix broken sites.
🔐 2. SSH Access (Command Line)
Requirements
SSH enabled on hosting
SSH username & password / private key
Steps
On Windows (use PuTTY), on Mac/Linux (use Terminal):
ssh username@yourdomain.com -p 22
If key is required:
ssh -i privatekey.pem username@domain.com
📌 You now have server-level access to run commands.
⚙️ 3. WP-CLI Setup & Usage
Most modern hosts already have it installed. After SSH login, type:
wp –info
If you see version details → it’s installed.
Useful Commands
Task Command
update WP wp core update
update plugins wp plugin update –all
update themes wp theme update –all
backup DB wp db export backup.sql
clear cache wp cache flush
reset password wp user update admin –user_pass=newpass
📌 You can fix admin login issues, update site, repair database even when dashboard is down.
🧪 4. Git Setup (Version Control)
Steps
- SSH into server
- Navigate to site folder:
cd public_html
- Initialize Git:
git init
- Add changes:
git add .
- Commit with note:
git commit -m “Initial commit”
🚀 5. Connect to GitHub (Deployment)
Steps
- Create a GitHub repository
- In repo → copy SSH link:
Example:
git@github.com:username/repo.git
- Add remote link on server:
git remote add origin git@github.com:username/repo.git
- Push files:
git push -u origin main
Now your site code is stored safely on GitHub.
🤖 6. Automatic GitHub Deployment (Optional but Best)
Tools you can use
GitHub Actions (Free)
DeployHQ
Buddy
Kinsta Git deploy
WP Engine Git deploy
📌 Meaning: whenever you update your theme/plugin and push to GitHub, the live server updates automatically — no uploading via SFTP manually.
👉 Example GitHub Action (Auto Deploy)
name: Deploy to Server
on:
push:
branches: [ “main” ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
– uses: actions/checkout@v3
– name: Deploy via SSH
uses: appleboy/ssh-action@v0.1.5
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_KEY }}
script: |
cd public_html
git pull origin main
📌 Meaning:
When you push code → GitHub logs in to your server → runs git pull → site updates.
🎯 Final Understanding
Tool Purpose
SFTP Manual file access & backup
SSH Secure command access
WP-CLI Manage WP without dashboard
Git Track and control code changes
GitHub Deployments Auto update site from GitHub to server
If you want, I can also: ✔ set up professional workflow
✔ show you best security rules
✔ teach you staging vs production deployment
Just reply “Continue” if you’d like more. 🚀
Leave a Reply