How to tail debug logs properly? How to zip the entire site in seconds? Essential Linux commands for WP admins.
EN

SSH for WordPress developers: 10 commands that will save your life

5.00 /5 - (30 votes )
Last verified: May 1, 2026
3min read
Guide
Full-stack developer

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.

Next step

Turn the article into an actual implementation

This block strengthens internal linking and gives readers the most relevant next move instead of leaving them at a dead end.

Want this implemented on your site?

If you want to convert the article into a working site improvement, redesign, or build plan, I can define the scope and implement it.

Related cluster

Explore other WordPress services and knowledge base

Strengthen your business with professional technical support in key areas of the WordPress ecosystem.

Article FAQ

Frequently Asked Questions

Practical answers to apply the topic in real execution.

SEO-ready GEO-ready AEO-ready 5 Q&A
Is SSH difficult to learn for WordPress developers?
SSH has a learning curve but provides 1000x faster workflow than FTP. Start with basic commands like ls, cd, and du.
What's the difference between SSH and FTP?
SSH provides encrypted shell access and full server control, while FTP only allows file transfers with slower performance.
Do I need SSH for WordPress development?
While not required, SSH is essential for professional WordPress development, debugging, and server management.
What are the most essential SSH commands for WordPress?
du for disk usage, grep for searching, tail for log monitoring, tar for backups, and WP-CLI commands.
Is SSH safe to use?
SSH is highly secure when using key-based authentication and proper server hardening practices.

Need an FAQ tailored to your industry and market? We can build one aligned with your business goals.

Let’s discuss

Related Articles

Still using Local by Flywheel or MAMP? Discover why Docker is the industry standard for WordPress development in 2026 and how to set it up.
development

Docker for WordPress development in 2026: Containerization made easy

Still using Local by Flywheel or MAMP? Discover why Docker is the industry standard for WordPress development in 2026 and how to set it up.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.
wordpress

WordPress development tutorial: a comprehensive guide for beginners in 2026

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

Learn when a website rebuild is necessary. 7 measurable technical and business signals that your site needs modernization in 2026.
wordpress

When to rebuild your website? 7 signs it's time for a redesign

Learn when a website rebuild is necessary. 7 measurable technical and business signals that your site needs modernization in 2026.