How to bundle plugins into a new WP theme

by 13 replies
17
Is it possible to create a WP theme that includes certain plugins already in the theme, just like Akismet and Hello Dolly are automatically included in the WP default theme?

If it is possible, is it easy enough for a super novice PHP programmer to do?

Thanks.
#programming #bundle #plugins #theme
  • Hi Kristen

    Plugins and Themes reside in independent directories and perform different functions in WordPress. The Akismet and Hello Dolly plugins are included with the base WordPress installation, not with the default theme - these plugins are available to use with any theme the user selects.

    You could bundle some plugins with your theme and offer them as a package, however you would need to install and activate them independently.

    If you want to learn how to program Themes and Plugins the best place to start is here:

    Developer Documentation WordPress Codex

    Bill
    • [1] reply
    • Thanks Bill,

      I guess what I'm really after is the ability to create a plugin that has a bunch of other plugins "in it" that automatically install, and activate.

      Does that make sense? Does auto install and activation go against the WP norm? Would it be Kosher to do something like that?

      Also, thanks for the How To resource. I will check it out today.
  • Hi Kristen

    Are you planning to create a multi-function Plugin that emulates the function of other popular plugins - i.e. a "Swiss Army Knife" of Plugins? That's a challenge but certainly doable, although perhaps you should start with a few simpler ones before building "the mother of all Plugins"!

    If instead you want to make a "super-plugin" that encompasses other common plugins and also installs and activates them - well that's not going to be an easy task. I'm sure you could automate the upload and installation part, but self-activating may not be that easy without modifying the WordPress core files or database.

    Self-activating does kind of go against the grain when it comes to WordPress, at least in my opinion. It's not unheard of for a plugin to cause a problem with a theme or a new release of WordPress, or for a poorly designed plugin to conflict with another one. Because of this it is necessary to be able to deactivate plugins and reinstall them easily.

    A few more links:

    http://www.devlounge.net/publik/Devl...s%20Plugin.pdf

    A 43-page PDF about building plugins


    How to create WordPress Plugin from a scratch

    Another guide to writing plugins.


    Bill
    • [1] reply
    • I think the OP just wants some way to automate having all of the plugins already installed, instead of having to go to the wp-admin screen, select Plugins->add new and manually add and activate each one. Its a nice idea, because some of the plugins become so standard that its tedious to have to install, say, Google Xsitemap each time you start a new domain.

      Unfortunately, I don't know how to do it but there must be some way.
      • [1] reply
  • Guess I can't be right all of the time!

    Kristen, I keep a set of standard themes and plugins that I FTP up to my site for every WordPress installation, this isn't as automated as I think you want but it's really easy to setup and maintain.

    If you want to go "all the way" you'll need to perform a standard WP installation on your test server with all your favorite plugins and themes. Activate and configure them as required. Then FTP the entire site back to your local hard disk. You could use 7 ZIP or the equivalent Windows or Mac utility to create a ZIP file of the whole thing, or just leave it expanded.

    Now use phpMyAdmin or the equivalent (if your test server is a local LINUX workstation you could use the MySQL GUI Tools) to make a full database backup. make sure you note the user name and password as you're "cloning" that as well.

    Next time you want to make a WP site FTP the entire file set up to the site. Create a database, if possible keep the name the same as the old one (that isn't really mandatory). There are a few configuration file you will need to edit, these articles will steer you to the right place:

    Moving WordPress WordPress Codex

    How to Move WordPress Blog to New Domain or Location My Digital Life

    To REALLY automate this you could write an install script that copied and expanded the files, created the database and edited the configuration files. Not sure if you want to go to that extreme though!

    Bill
    • [1] reply
    • Why not just go with Wordpress MU?

      Then you only have to install and update the plugin on one installation.

      I have seen a few themes that code the plugins in the function file, but then you run into issues when updating.
      • [1] reply
  • No, you can use multiple domains each with their own site with WPMU.

    There is also the subdomain feature, but I've actually never used it that way myself.
    • [1] reply
    • Banned
      [DELETED]
    • Oh wow. That sounds great then.
      So I am just setting up sites on addon domains so could I set up wpMu on my main domain and then use it to set the other sites?
      That would be awsome.
      Are there plugins specific to wpMu? Because I'm also interested in being able to monitor all those sites from a single panel.

      Thanks a ton.
      • [1] reply

Next Topics on Trending Feed

  • 17

    Is it possible to create a WP theme that includes certain plugins already in the theme, just like Akismet and Hello Dolly are automatically included in the WP default theme? If it is possible, is it easy enough for a super novice PHP programmer to do?