1

I have been thinking of managing a set of wordpress sites from a remote server.I would like to get information on plugins that has been installed on my wordpress sites.I would also like to install plugins to the corresponding wordpress sites from my remote server.I have searched and found that XMLRPC might help in retreving the details.

Could some one give me an idea on how this could be achieved or if there is any other means to achieve this.Thanks

3 Answers 3

2

If you're only managing a few sites and you're comfortable with the command line, you might want to look into wp-cli. With a little bit of scripting you can SSH into a remote server and do all manner of stuff like:

Enable plugins:
wp plugin activate acf-pro gravityforms wordpress-seo

Check the versions, activation and update availability:
wp plugin status

Update all plugins, optionally doing a dry run first:
wp plugin update --all --dry-run

Update all themes:
wp theme update

And all of the other stuff wp-cli enables like:

Back up the db:
wp db backup ../data-backup-directoy

Adjust posts:
wp post update 6 --post_author=1

Add or edit a user:
wp user create sally [email protected] --role=subscriber

Update options:
wp option update siteurl http://foobar.com

I manage most of my sites with it and a few bash scripts which consist of ssh in, do stuff, report back. Here's a script I use to backup a remote site's database, pull down a copy, load it into my local instance and reactive development-only plugins (that are disabled on the live site, natch):

#!/bin/bash

DATE=`date +%Y-%m-%d-%H%M`

# Backup the local db, just in case. Note that /data/local/* is .gitignored
wp db export ../data/local/$DATE.sql

# export live
ssh [email protected] "cd /path/to/wordpress/; wp db export /path/to/site/data/live-dump-$DATE.sql"

# pull it down
scp -Cp [email protected]:/path/to/site/data/live-dump-$DATE.sql /path/to/local/data/live-dump.sql

#import it
wp db import /path/to/local/data/live-dump.sql

# reactive local developer centric plugins
wp plugin activate debug-bar console debug-this debug-bar-extender debug-bar-hook-log

wp-cli is boss mode for WordPress. It even has tab completion on the command line. :)

HumanMade was working on some code to make remote management with it a first class citizen but it hasn't been touched in a couple of years. I find that using ssh and either running commands manually or doing a little bit of scripting is all that I really need.

2
  • Tanx a lot mate.That gave me some idea on this.I recently found that sites like mainwp,ithemes sync etc has features like installing plugins remotely.Could you please tell me how do they perform this action ?Is it via wp-cli or xmlrpc ..??
    – Outlooker
    Sep 1, 2015 at 6:38
  • I've never used them so I don't really know. Looking at the source code for mainwp it seems like they use curl + a child plugin on each site.
    – Will
    Sep 1, 2015 at 8:51
0

If you are not agains using and installing plugins on all of your servers.

Then MainWP can be of help. While they offer a lot more then what you ask for their plugin has some solid ways of managing other installs.

MainWP is free and open source, yet they offer some paid extra's http://www.mainwp.com

Alternatively you can use the XML-RPC to post to the different blogs which would require the use of a custom plugin where you create a page with a button to load plugins from either predefined sites or a checked list on the page. And then use Javascript/jQuery and AJAX to get the list of active/inactive plugins for those websites

1
  • tanx for the quick response.I found that the mainwp has features like installing plugins remotely.Could you please tell me how do they perform this action ?
    – Outlooker
    Sep 1, 2015 at 6:34
0

Fact is, it’s pretty ridiculous that WordPress has not developed a dashboard on its own. The nice thing about it being open source, however, is that the community - which consists of extremely talented developers and designers - has a terrific ability to create plugins like ManageWP that solve problems such as this

http://managewp.com

1
  • Could you please tell me how do sites like managewp perform this action ?Is it via wp-cli or xmlrpc ..??
    – Outlooker
    Sep 1, 2015 at 6:39

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.