Category:Tutorials | Last modified: January 31, 2023
Please note: SSH & WP CLI access is currently in closed, early beta testing and is not yet available to all Pressable users. Due to the complex nature of SSH and WP-CLI, we are not able to provide extensive support for using these tools. Pressable support is available to help with issues connecting via SSH but cannot guide you through using commands.
SSH, or Secure Shell, is a protocol that allows you to connect to services such as web servers. This allows you to connect to our servers and manage your WordPress website via command-line tools such as WP-CLI.
SSH access is currently activated at the account level and so is available for all sites on your account and all collaborators with SFTP access on those sites.
How to connect via SSH:
Step 1:
Get your SFTP credentials from the Users tab for the site to which you want to connect.
Note: You must click the password regenerate icon to set an initial SFTP password or you will get a connection error.
Step 2:
From your terminal client use the following syntax to connect. Please be sure to replace [username] with your own SFTP username from the Users tab.
ssh [username]@ssh.atomicsites.net
When prompted enter your SFTP password
Step 3:
Once you are connected you can use SSH and WP CLI commands.
How to take backups before making changes via SSH:
It is possible to quickly and permanently alter or delete data via SSH. While you can restore using our automated backup and restore tool it’s possible that you may lose data or changes made since the last backup was taken.
For this reason, we strongly recommend taking a manual backup before making changes via SSH. Placing these files in your /tmp directory will prevent them from being accessible from the web.
To take a database backup:
cd /tmpwp db export
To take a site files backup (replace [additional info] with the date or another useful identifier):
cd /tmptar -czvf sitefiles[additional info].tar.gz /htdocs/wp-content
To remove a backup file once you no longer need it:
Because ssh users exist on a per-site, not a per-account basis, you will need different credentials for each site. You can automate getting SFTP user credentials with the Pressable API.
The Pressable API allows you to communicate with your managed WordPress hosted Pressable site using an external application written in any programming language. Some of the things you can do after you…
PHP is a scripting language for web development and WordPress is a PHP-powered content management system. Processing PHP code ultimately renders your WordPress page or post. Your WordPress core system files, themes,…
SSH, or Secure Shell, is a protocol that allows you to connect to services such as web servers. This allows you to connect to our servers and manage your Pressable website via…