Skip to content

Shell Commands

You should be careful with running commands to prevent data loss or damage to your site. Make sure to only run commands when you know exactly what they will do.

Extensive resources are available on using the Linux command line. Some popular examples include the following third-party sources:

Below are some common commands:

CommandDescription
lsShow a list of the current directory’s contents.
cdChange directory.
mkdirCreate a new folder/directory.
touchCreate a file.
rmRemove a file.
catShow contents of a file.
cpCopy.
mvMove.
pwdShow current directory.
grepSearch for a specific phrase in file/lines.
findSearch files and directories.
nanoText editor.
historyShow last 50 used commands.
clearClear the terminal screen.
duGet file size.
rsyncCopy files to and from the server.

Use WP-CLI

WP-CLI comes preinstalled on WordPress.com and extends the shell to provide WordPress-specific command line tools. You can start running WP-CLI commands once you have connected to SSH.

There are many commands and subcommands that can help with managing and troubleshooting your site. For more on the commands available and how to use them, you can visit our WP-CLI guide or the WordPress.org documentation for WP-CLI.

Troubleshooting

If something happens to your site after you’ve made changes via SSH, you can restore your site from a Jetpack backup.

If you run a command and something happens you didn’t expect, we can help you restore your site to an earlier point from before you ran the command. We will not be able to help you debug your command to make it work as expected.

Last updated: May 12, 2025