I want to install a plugin using wp-cli (or anything else) on a WordPress based website. I have URL, admin-user, admin-pass only. (no FTP/ssh). I want to do it programmatically, without going into the browser. I am able to do so on my local WordPress install.

  • 1
    This isn't going to be possible via WP CLI without SSH access, there are services that can do it but you need to install a plugin for them to start working. Unfortunately, plugin/service/product recommendations are not in scope. Have you tried just logging in with the admin user/pass and going to plugin->add? What's the context behind this, or the problem this solves?
    – Tom J Nowell
    Oct 3, 2018 at 21:53
  • @TomJNowell Actually, I want to write a script which accepts above three parameters (URL, admin-user, admin-pass) and install a plugin on that WP instance. The most obvious way I found was wp-cli, but I realized that it required ssh access or wp-cli on both servers installed. Oct 3, 2018 at 21:57
  • What problem does that solve? Are you trying to implement a deployment strategy? An easy way for people to install a plugin you're selling? What's the context?
    – Tom J Nowell
    Oct 3, 2018 at 21:58
  • Yes, I want to create a WordPress management solution, or at least learn it how some popular solutions are working, like managewp and wpmudev hub etc etc. Oct 3, 2018 at 22:29
  • @Abdul Waheed You said "but I want to do it from server, not by going to browser". Why do you want to "do it" from the server? What assumptions are you making?
    – Tedinoz
    Oct 7, 2018 at 17:21

1 Answer 1


At the risk of stepping into the unknown, I reckon that you are over-complicating things-full remote access to the WP database sounds like the most effective solution. What could you not do if you had access to the database?

Having said that, you have a duty to have done your own research, and to have explained what you have tried &/or how you have approached a solution. For instance, have you looked at any of the free and/or “open source” solutions (the five minutes I spent on research revealed “MainWP” or “Shift8 Remote Management” as possible candidates). I sense that you have come in search of the holy grail, and while people are only too happy to assist you, there is no such thing as a “free lunch”.

  • Hi @Tedinoz, The main thing is file management here. I want to install a plugin on a remote site (programmatically) from my server using any solution (no matter, wp/php or any other app like wp-cli). I have wp-admin access to that site, I can do that by going to browser, but I want to do it from server, not by going to browser. don't know if wp-cli is installed on that server or not. This is where wp-cli failed. (I have tried wp-cli) Oct 5, 2018 at 18:10
  • Both of above plugins require a plugin already installed on remote site, first-step. Which I want to do programmatically. Oct 5, 2018 at 18:12
  • similar question, but with no answer unfortunately. wordpress.stackexchange.com/questions/275567/… Oct 5, 2018 at 18:25
  • What about something like Selenium?
    – Tedinoz
    Oct 5, 2018 at 23:27
  • Selenium. Proof positive that if you have the admin name and password, then the world is your oyster. This YouTube video “Selenium Java Tests with WordPress” shows how installing a plugin would be like falling off a log. This version is Java, but Selenium is available in several incarnations, I believe.
    – Tedinoz
    Oct 6, 2018 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.