Automatic plugin/theme installation and updating without access to Dashboard ...

This is really a general question.

I am managing a number of WP installations - separate installations not multisites under different users, different databases, different prefixes etc. on a Ubuntu 10.04 platfrom. Each has a different set of (mainly WPMUDEV) plugins and themes. I have full shell access (ie as root, www-data or whatever is necessary) to all trees.

Clearly if I copy a new plugin or theme into the plugins or themes directory under wp-content and correct the ownership/group access, that plugin or theme immediately becomes visible as a deactivated item.

I have two questions:

1) How to install the plugin/theme and automatically activate it. Is there a way of using the WP installation from a shell?

Thanks for this your response. Both these activities must be initialised by Wordpress itself so it is a small(!) matter of working out how and where and writing a routine to call this with the appropriate arguments.

I'm surprised how many CMS's assume everything is done from a web page on a one-by-one basis in fact - I couldn't see how to do it in Drupal or Joomla either although I am not as familiar with them as with WP. Handling things this way, checking which plugins/themes are installed (the user may of course install their own, remove them, update or download their own) would make maintenance so much easier.

I realise that MU does half the job - they would still need activating - but I don't want to use MU unless it is necessary and appropriate. I prefer the sites to be independent as that is less of a risk should something go wrong.

I believe this would be possible but you'd need a PHP script that loads wp-blog-header.php (I think) that you would then pass an argument to on the command line which would tell it the plugin to activate and that would trigger WP's normal activation script.

Thanks for the clue. It's a bit deeper than that I think as wp-blog-header.php only has a couple of require's in it. There is a file update.php which contains some interesting stuff about how often checks are made. Some grepping later highlights various files and functions that could be of use. I will carry on investigating but all clues gratefully received!

How do you rate me?

Thank you for rating your experience!

We’re thrilled to hear you had a great experience with . Would you like to leave a comment about your experience?
Thanks for voting on your experience with , we’d love to get some feedback please.
Ohh no! We’re really sorry to hear you didn’t have a pleasant experience with , we’re always looking at how we can improve and would appreciate you provide some further feedback here please.
Type your feedback here

it's great that you had a positive one. Based on your experience in this ticket would you please be kind enough to rate us externally on: