Guides/Plugins and tools/Tools/Connect to SSH

Connect to SSH

SSH (Secure SHell) allows you to use a terminal application to access the backend of your site and manage certain site files and settings. It also provides access to WP-CLI, which can be used to quickly make site changes and troubleshoot issues.

This section of the guide applies to sites with the WordPress.com Business and Commerce plan, and the legacy Pro plan. If you have a Business plan, make sure to activate it. For sites on the Free, Personal, and Premium plans, upgrade your plan to access this feature.

Video tutorial

Enable SSH on your site

If you are accessing SSH for the first time, you can create your credentials and enable SSH Access using the steps below:

  1. Visit your Sites page: https://wordpress.com/sites/
  2. Click the ⋮ next to your site and select Settings.
  3. Scroll down and click SFTP/SSH.
  4. Click “Create credentials“. This only needs to be done once and will generate the SSH username and password for the selected site. The credentials will be used for both SFTP and SSH connections.
  5. If you’ve already created the credentials before, they will be displayed, but you’ll need to use the “Reset password” button to generate a new one.
The SFTP/SSH panel in the WordPress.com hosting dashboard.
  1. Store the password in a safe place. If you lose or forget your password, the “Reset password” button can be used to generate a new one.
  2. Below the password, locate the SSH section and toggle the “Enable SSH access to this site” option.
  3. Once SSH access has been enabled, a connection command will appear. You can copy this command and paste it into your terminal application to connect to your server via SSH.
The SFTP/SSH panel in the WordPress.com hosting dashboard with SSH enabled.

Connect to your site via SSH

To connect to your site via SSH, you will need:

  • Your username and password from the SFTP panel in your site’s settings.
  • SSH access enabled on your site.
  • The connection command provided (macOS and Linux systems).
  • A terminal program on your computer.

Below are instructions on how to connect using some of the most common terminal programs.

Connect to SSH on macOS and Linux

To connect to SSH on macOS or Linux:

  1. Open your computer’s terminal application.
    • On macOS, visit Applications → Utilities on your computer and open the terminal application.
    • On Linux, please consult your distribution’s documentation for more on opening a terminal window. Some versions may refer to the terminal program as a shell, console, or command prompt.
  2. Paste or type the ssh command into your terminal application and press enter/return. If this is your first time connecting, your terminal may prompt that it cannot establish the authenticity of the host. Type yes and press enter/return to proceed.
  3. Your terminal should now prompt you to enter a password. Paste or type in the SSH password provided when creating your SSH credentials and press enter/return.
    • Note that when entering your password into your terminal application, characters will not appear as you type. This is by design.
  4. If successful, you should now be connected to SSH and can begin running shell and WP-CLI commands.

Connect to SSH on Windows

Recent versions of Windows, starting with 10, have added SSH support via the Windows Subsystem for Linux as well as the OpenSSH client. Please consult Microsoft’s official documentation for using these methods.

Another option for both current and older Windows versions of Windows is to use PuTTY with these steps:

  1. Download and install the free PuTTY client.
  2. In PuTTY, configure the Host Name to ssh.wp.com and the Port to 22, then click Open.
  3. If this is your first time connecting, you may receive a prompt to trust the rsa2 fingerprint and host. Click Yes.
  4. PuTTY will launch a terminal screen. Enter your SSH username and press enter/return.
  5. When prompted, enter your SSH password.
  6. If successful, you should now be connected to SSH and can begin running shell and WP-CLI commands.

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, visit the WordPress.org documentation for WP-CLI.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!