If you use WordPress to power your website and have a bit of technical knowledge (particularly of Linux shell), then taking advantage of the command line interface tool, wp-cli, might be of interest to you!
WP-CLI is a command line method of working with WordPress. Rather than triggering actions by logging in to the WordPress admin GUI, you do so when logged in via SSH command line. One advantage to using wp-cli is that you bypass the entire web server stack, including nginx, apache, fastcgi, and php, which can be advantageous particularly when running longer-running tasks (like imports/exports of data) since you’re no longer subjected to heavy timeout restrictions on each process.
Let’s get started:
- Log in to your Plesk system user account via SSH (If you have your own VPS, it’s best not to run this as root, but you can sudo to the domain’s system user account prior to running the commands)
- Change to your web root directory where WordPress is installed. The web root folder/dir for each domain is shown in Plesk. For your primary domain this is httpdocs.
- Run the following to download and run wp-cli’s info function:
wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar php wp-cli.phar --info
For any wp-cli command you see in their documentation, simply cd to your web root dir and replace ‘wp’ with ‘php wp-cli.phar’.