As a WordPress Developer, you probably spend a lot of time in an FTP client (FileZilla) or hosting panel. That’s a mistake. What takes 15 minutes in FTP (e.g., deleting a cache folder with 100,000 files) takes 2 seconds in the SSH terminal.
In this guide, I will show you a set of commands that senior developers cannot imagine working without.
1. Disk analysis: What’s eating my space?
When hosting screams “Quota Exceeded”, FileZilla won’t help. Use this:
Du (disk usage)
## Show folders IN current directory, sorted by size
du -h --max-depth=1 | sort -hr
Ncdu (ncurses disk usage)
If you can, run ncdu. It’s an interactive manager you navigate with arrows. An absolute “Game Changer” for server cleaning.
2. Logs: Real-time debugging
Instead of downloading debug.log, opening it with Notepad, and searching for errors… watch it live!
Tail -f
## Follow the last lines of the file IN real-time
tail -f wp-content/debug.log
Now refresh the page in your browser, and errors will appear on the screen. Exit with Ctrl+C.
3. Searching files: Where is that code?!
Looking for where add_image_size was used? Don’t download the whole project.
Grep
## Search for the phrase "add_image_size" IN all PHP files recursively
grep -r "add_image_size" .
If you just want a list of files (without content):
grep -rl "add_image_size" .
4. Permissions: Fixing “403 forbidden”
Often after migration, files have wrong permissions. Remember the rule:
- Directories: 755
- Files: 644
Find + chmod
Don’t do it manually. Automate it:
## Set 755 for all directories
find . -type d -exec chmod 755 {} \;
## Set 644 for all files
find . -type f -exec chmod 644 {} \;
5. Backups: Fast archive
Want a quick backup before an update? Don’t copy via FTP (takes ages). Zip it on the server.
Tar
## Create archive backup.tar.gz of current directory
tar -czf backup.tar.gz .
Unzipping:
tar -xzf backup.tar.gz
6. Database (wp-CLI)
If you have WP-CLI (and you should), you don’t need phpMyAdmin.
## Export db
wp db export backup.sql
## Import db
wp db import backup.sql
## Reset db (careful!)
wp db reset
7. Mass file deletion
Deleting a plugin cache folder containing a million small files via FTP can take an hour.
Rm
## Delete folder and everything inside (no undo!)
rm -rf wp-content/cache/
Time taken: 0.5 seconds.
Summary
The SSH terminal doesn’t bite. It allows you to work at the speed of the server’s disk, not your internet connection speed. Start with ncdu and tail -f – you won’t want to go back to mouse clicking.


