Title: Auto-install plugins when activating a theme.
Last modified: August 20, 2016

---

# Auto-install plugins when activating a theme.

 *  [adrian7](https://wordpress.org/support/users/adrian7/)
 * (@adrian7)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/)
 * As a theme developer, I’ve got many times this problem:
 * You see, for some features of your themes you may need few plugins (or dozens),
   and many times your theme might just not work whithout them.
    So you have to:
   1. Bundle those plugins with your theme – and have users read dozen-lines installation
   instruction (not retarded-proof!). 2. Re-build or copy the functionality in your
   theme – more work…
 * WordPress has a great one-click installer for plugins, and theme developers should
   benefit of this.
 * It would be great to have an api, and with a few lines of code, to request and
   automatically install plugins you need for the theme just after/just before activating
   it.

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 8 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325671)
 * Some people have done that, but right now WP isn’t headed that way, as there’s
   no good way to maintain the ‘packages’.
 *  [SirZooro](https://wordpress.org/support/users/sirzooro/)
 * (@sirzooro)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325718)
 * You can add some extra code to your theme which will check if all required plugins
   are active. If not, display error/warning message in admin backend.
 *  Thread Starter [adrian7](https://wordpress.org/support/users/adrian7/)
 * (@adrian7)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325719)
 * Ok, can somebody post some sample code…?
 *  [ivanoconfa](https://wordpress.org/support/users/ivanoconfa/)
 * (@ivanoconfa)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325720)
 * Yes, I could really do with the same sample code too. I searched on google and
   could not find anything helpful. I am finding a bit of a nightmare to embed a
   slideshow plugin within my theme, it cannot link to the images in uploads folder.
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325732)
 * [http://wpcandy.com/reports/the-tgm-plugin-activation-class-on-github](http://wpcandy.com/reports/the-tgm-plugin-activation-class-on-github)
 * Some info here which may be interesting to you
 *  [ivanoconfa](https://wordpress.org/support/users/ivanoconfa/)
 * (@ivanoconfa)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325733)
 * Thanks! this works!
 *  Thread Starter [adrian7](https://wordpress.org/support/users/adrian7/)
 * (@adrian7)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325736)
 * Yes, looks great! It should be included in wordpress.
 * [https://github.com/thomasgriffin/TGM-Plugin-Activation](https://github.com/thomasgriffin/TGM-Plugin-Activation)
 *  [Gary Jones](https://wordpress.org/support/users/garyj/)
 * (@garyj)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325748)
 * adrian7,
 * The code in TGMPA makes use of all the WP code anyway for unzipping a plugin 
   and installing it. All we’ve done is provide a way for theme authors to say “
   Hey, this theme NEEDS this plugin to work properly”, and a way for users to say“
   OK, sure, install and activate that plugin then” – plugins can be included with
   the theme, pulled from the .org repo, or from anywhere else online.
 * As such, it kinda already is *in* WordPress – we’ve just made it easier to access.
 *  [ivanoconfa](https://wordpress.org/support/users/ivanoconfa/)
 * (@ivanoconfa)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325749)
 * This is great particularly because it opens up huge possibilities for non developers
   like me to design themes by including plugins without the need for extra coding.
   There must be 1000s of designers who cannot code a plugin within a theme who 
   will welcome your TGMPA.
    Saying that, a single button to install all plugins
   at once would be even better. Thank you
 *  [Gary Jones](https://wordpress.org/support/users/garyj/)
 * (@garyj)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325750)
 * Bulk install is one of the future features we plan on adding in.
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325751)
 * [@garyj](https://wordpress.org/support/users/garyj/), good stuff, I’ve been dropping
   your link to folks a lot lately!
 *  [Thomas Griffin](https://wordpress.org/support/users/griffinjt/)
 * (@griffinjt)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325753)
 * As Gary has mentioned, Bulk install is one of the features we plan on implementing
   once we chisel away at a few other pressing issues (like consolidating nag messages).
   Bulk install will be huge when it is functioning 🙂

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Auto-install plugins when activating a theme.’ is closed to new replies.

## Tags

 * [automatically](https://wordpress.org/support/topic-tag/automatically/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 12 replies
 * 7 participants
 * Last reply from: [Thomas Griffin](https://wordpress.org/support/users/griffinjt/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/auto-install-plugins-when-installing-a-theme/#post-2325753)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
