Running WP-CLI without SSH

But i am not able to understand how it’s done.

It says so in the first paragraph,:

Need to use WP-CLI on a WordPress site, but don’t have SSH access to
its server? Simply change your local WordPress install’s database
credentials to use the remote site’s configuration, such that the
local WordPress install is using the remote database
. You’re now free
to run commands to your heart’s content.

So it’s operating on a local WP install that is using a remote DB ( the production DB ). The commands do not run on the remote server, they run on your local computer. This means you’re going to need to install PHP on your computer, or a local developer environment

I have a website with only FTP access and i want to run wp-cli is it possible?

Did you try it? FTP access is irrelevant here, it does not run on the remote server, it runs on your computer

  • The remote WordPress site’s database will need to accept public connections, or you’ll need to be able to whitelist your IP address.

This is the only remote part

  • Your local WordPress install should use the exact same codebase as the remote install.

As he said, it runs on your local machine, so the files need to be identical

  • Any filesystem operations will be happening on your local machine, not the remote server. If you install and activate a plugin, the remote WordPress site will then try to run a plugin that doesn’t exist on its server.

So no file operations, only database changes. You can’t use this to update WP, install plugins, import content etc

  • Bad things can happen. Be very careful, and make sure you have a ready way to clean up your mess.

As mentioned, be warned


All in all, I would advise against doing this, especially if the original post was not clear enough to you. Since you did not mention what you were trying to do with WP CLI, I would suggest the following:

  • Ditch your host for a host that provides SSH. Some shared hosts provide this and can run WP CLI, e.g. dreamhost. Any VPS will let you do it. You do not need to spend a fortune on a fancy server to be able to do it
  • You can create a clone of your site on your computer and run the commands locally, then replace the production site with your modified clone
  • You could open a question asking how to do what you actually wanted to do, WP CLI might not be the only solution available

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)