How to Use Shell Commands
PLEASE NOTE: You should be careful with running commands to prevent data loss or damage your site. Make sure to only run commands when you know exactly what they will do.
To use shell commands, you need to use SSH. You can learn how to connect to your site(s) via SSH here.
Extensive resources are available on using the Linux command line. Some popular examples include the following third-party sources:
Common Shell Commands
Command | Description |
---|---|
ls |
Show a list of the current directory’s contents. |
cd |
Change directory. |
mkdir |
Create a new folder/directory. |
touch |
Create a file. |
rm |
Remove a file. |
cat |
Show contents of a file. |
cp |
Copy. |
mv |
Move. |
pwd |
Show current directory. |
grep |
Search for a specific phrase in file/lines. |
find |
Search files and directories. |
nano |
Text editor. |
history |
Show last 50 used commands. |
clear |
Clear the terminal screen. |
du |
Get file size. |
rsync |
Copy files to and from the server. |
Frequently Asked Questions
Can I get support for using command line tools?
Due to the complex nature of SSH, we are not able to provide extensive support for using these tools. Our Support Team is available to help with issues connecting via SSH but cannot guide you through using commands.
Are all commands available?
In order to provide a secure and performant environment, Pressable may restrict or disable certain shell and WP-CLI commands.
What if something goes wrong?
If something happens to your site after you’ve made changes via SSH, or if you run a command and something happens you didn’t expect, you can restore your site from a backup.
We will NOT be able to help you debug your command to make it work as expected.