Add Plugins to WordPress Theme

I’m creating a wordpress theme that I aim to sell at some point.

Now, I’ve discovered that some of the wordpress.org plugins would be great for things that I want to do. They already hold much of the functionality I aim to achieve, so I thought of using them directly (they are under GPL I suppose).

Read More

I would probably need to adjust stuff, but I was wondering. Is there any universal-like way to include wordpress plugins inside my theme and not in the separate plugins folder ?

That would be ideal, because I do not really want customers to have to copy to different folders. At first glance of the plugins, it seems not possible, but I suppose it never hurts to ask 🙂

Related posts

Leave a Reply

3 comments

  1. Let me make a recommendation: do not bundle plugins with your theme!

    On first glance, yes this is a very easy way to add default functionality with your theme, but there are a slew of reasons not to include the plugins this way:

    1. Updates: If the plugin is freely available from WordPress.org already, then so are automatic updates to the plugin. The original author can add features, fix bugs, and deploy them quickly. Your clients and customers then benefit from on-going development. If you were to package them in your theme, though, you are essentially freezing the code at that point in time – any further updates, bug fixes, etc. would have to come from you. This means you’ll need to continuously release theme updates whenever the included plugins update.
    2. Updates: When WordPress updates, some plugins will break. This is because the original authors didn’t take the time to remove deprecated functionality or test with new versions of WP. Do you really want to commit to maintaining your theme + someone else’s code?
    3. Interoperability: As the great mfields once said, “If you’re building a bathroom and you change the wallpaper, the toilet shouldn’t disappear, too.” Users should be able to swap out themes whenever they want without losing their content, their custom data, or the additional functionality they have on their site. Remember, themes are meant for presentation, plugins are meant for functionality.

    There have been plenty of other people who’ve talked about this in the past.

    The better way to do this would be to have your theme check for specific plugins and prompt the user for installation if they’re missing.

  2. I strongly believe that if you aim to sell at some point you should NOT include/use GPL plugins and only your own!!!

    Now after that being said simply include the plugin’s main file you your theme’s functions.php and edit all path’s