Developer Guide — New Project
Wait for DevOps handover before starting
DevOps will send you the GitHub repo link and staging site credentials first.
What DevOps Sends You
GitHub Repo: https://github.com/ChamodTharuka/rocell-wordpress-theme
Branch: staging
Staging Site: https://rocell.dev.enfection.com
WP Admin: https://rocell.dev.enfection.com/wp-admin
WP User: admin
WP Password: xxxxxxxx
Overview
Step 1: LocalWP → Create local WordPress site
Step 2: Theme → Create your custom theme folder
Step 3: Git Bash → Connect theme folder to GitHub repo
Step 4: Git Bash → Push theme → pipeline runs automatically
Step 5: Check → Staging site updated with your theme ✅
Step 1: LocalWP — Create Local Site
Open LocalWP → + (bottom left) → Create a new site
Site name: Rocell Website
PHP version: 8.2
→ Create site
XAMPP conflict
Stop XAMPP Apache + MySQL before starting LocalWP site. You cannot run both at the same time on port 80.
Step 2: Create Your Custom Theme
Go to your LocalWP theme folder:
Create a new folder named rocell-theme. Add your theme files inside:
rocell-theme/
├── style.css ← required
├── functions.php ← required
├── index.php ← required
└── ... (your other theme files)
Minimum style.css header:
Activate theme in LocalWP:
Step 3: Connect Theme Folder to GitHub Repo
Open Git Bash and run these commands:
# 1. Go to your theme folder
cd "C:/Users/[your-name]/Local Sites/rocell-website/app/public/wp-content/themes/rocell-theme"
# 3. Connect to the GitHub repo DevOps created
git remote add origin https://github.com/ChamodTharuka/rocell-wordpress-theme.git
# 4. Download the DevOps files (deploy.yml, sonar config, .gitignore, docker files)
git fetch origin
Your theme folder now has DevOps files merged with your theme files. ✅
Step 4: Push Theme to Staging
Step 5: Check Pipeline & Verify Staging
Check GitHub Actions:
Wait for both jobs:
✅ SonarQube Scan (~1-2 min) — code quality check
✅ Deploy to Staging (~30-40 sec) — theme pushed to server
Verify staging site updated:
Daily Workflow (After First Setup)
# 1. Edit theme files in your editor
# 2. Test locally
http://rocell-website.local
# 3. Push to staging
git add .
git commit -m "feat: describe your change"
git push origin staging
# ✅ Pipeline runs → staging updated automatically
Key Rules
- Always push to
stagingbranch only - Never push to
productionormain— DevOps only productionbranch = live client site — DevOps merges when client approvesmainbranch = safety backup only- DB or content changes → use All-in-One Migration plugin, not Git
- Pipeline failed? Check Actions tab → click failed run → read logs