I'm wondering if there is a way for a plugin to install other plugins directly. That means, I provide an interface for the user to click multiple plugins and download and install them directly to wp-content/plugins.

Basically imagine a marketplace plugin within wordpress where users can purchase plugins FROM a plugin and install directly into their site.

I would like to find out the API or any ideas on how to achieve the installation/upgrade.

  • Do you mean you want to promote your other plugins in a plugin of yours the user downloaded and installed into there site, so that the user can purchase it and install it in a couple clicks without leaving the site/page? Or do you mean you want to have a marketplace website that a user can purchase the plugin and have it install into there site directly? Commented Oct 11, 2013 at 3:55
  • yes, as long as the user that the web server runs under has permissions to write to plugins dir.
    – gwillie
    Commented Oct 11, 2013 at 3:58
  • Yes the latter sort of. I want a plugin like plugpress.com
    – Aaron Lee
    Commented Oct 11, 2013 at 9:21

4 Answers 4


You can take a look at TGM-Plugin-Activation plugin. It should give you good starting point. As written in the documentation:

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference pre-packaged plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.

  • AWESOME! didn't know this was here. thanks @Euguene
    – Aaron Lee
    Commented Oct 11, 2013 at 9:19

Yes, this is possible, but there isn't really any magic API for it. Because WordPress scans the plugins folder for plugins, installing a new plugin is simply a matter of writing the files to the plugins folder, and uninstalling is just deleting the files from the folder.

If you want to be able to activate or deactivate plugins programmatically, you can use the activate_plugins and deactivate_plugins functions.


Take a look to http://wpfavs.com . With that plugin you can create list of favorites plugins and then do bulk installs


A useful tool to do this is: WP-CLI - WordPress Command Line Interface. You can list all plugins, activate, deactive, install, uninstall, and/or update one or more plugins using a script. A huge timesaver.

Your Answer

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

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