Build and run your site from ChatGPT
Guides/Plugins and tools/Tools/Connect to SSH

Connect to SSH

Last reviewed on November 25, 2026
Works with:

SSH (Secure SHell) allows you to use a terminal application to access the backend of your WordPress.com 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 feature is available on plugin-enabled sites with our WordPress.com Personal, Premium, Business, and Commerce plans. If your site has one of these plans, make sure to activate it. For sites on the free plan, upgrade your plan to access this feature.

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 Hosting Dashboard.
  2. Click the title of the site you want to manage.
An arrow points to the site title for a site listed in the Hosting Dashboard.
  1. In the left sidebar, select Settings.
  2. Scroll down and click SFTP/SSH.
  3. 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.
  4. If you’ve already created the credentials before, your URL, port, and username will be displayed, but you’ll need to use the “Reset password” button to generate a new password.
The SFTP credentials in the Hosting Dashboard, with the Reset password and Delete credentials buttons.
  1. Store the password in a safe place. If you lose or forget your password, click the “Reset password” button to generate a new one. You can reset the password as often as you need, with a one-minute wait between resets.
  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.

Use SSH keys to connect without a password

SSH keys let you connect to your WordPress.com site without typing your SSH password each time. You can add up to 10 SSH keys to your WordPress.com account, give each one a label, and attach them to your sites. To create a key, add it to your account, attach it to a site, and update or remove it later, visit our guide to generate an SSH key.

Supported SSH key types

Your public SSH key must begin with one of the following:

Key typeKey begins with
RSA (2048–16384 bits)ssh-rsa
ECDSAecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521
Ed25519ssh-ed25519
Ed25519 stored on a physical security key (FIDO2)sk-ssh-ed25519@openssh.com

ECDSA keys created on a security key (sk-ecdsa-sha2-nistp256@openssh.com) are not supported. If your security key can’t create Ed25519 keys, use a regular Ed25519 key instead.

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. If you use an SSH key, you don’t need the password.
  • 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.
    • If you have existing SSH keys on your computer, you may first see a prompt asking for a “passphrase for key.” This is different from your WordPress.com SSH password. Press enter/return to skip past these prompts until you see the password: prompt.
    • 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.

Your home directory

Your SSH home directory (~) is for files you work with on the command line, such as with WP-CLI. WordPress can’t read files in your home directory when it handles web requests, such as loading your site’s pages, whatever their file permissions. Your home directory is also outside the folders that WordPress.com backups include.

If a plugin needs a key or other secret, add it to your site’s wp-config.php file as a constant, or put it in a separate .php file outside the wp-content folder and load that file from wp-config.php. Before you change wp-config.php, read Can I edit my site’s wp-config.php file?

Don’t store keys in other file types, such as .key, .json, or .txt files, anywhere in your site’s folders. Anyone who knows a file’s web address can download it.

Was this guide helpful for you?

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

Copied to clipboard!