Title: Calling plugin from functions.php
Last modified: August 19, 2016

---

# Calling plugin from functions.php

 *  [flow01](https://wordpress.org/support/users/flow01/)
 * (@flow01)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/calling-plugin-from-functionsphp/)
 * How do I run plugin using functions.php instead of putting it into plugins folder?
 * Code below works for some plugins:
    `require_once (TEMPLATEPATH . '/includes/
   some/path/to/plugin/plugin.php');` but if I try to load plugins with multiple
   php files it causes error.
 * I just want to move all the plugins to theme directory and make them load automatically
   when the theme is loaded.

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

 *  [Equal Web Creative](https://wordpress.org/support/users/equalwebcreative/)
 * (@equalwebcreative)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/calling-plugin-from-functionsphp/#post-1546491)
 * The reason why it fails for plugins with multiple php files is because some of
   those other php files will be referencing each other from the plugins folder 
   and they will not be present.
 * Have you thought about putting them in the mu-plugins folder? That way they will
   run automatically without the need for activation.
 *  Thread Starter [flow01](https://wordpress.org/support/users/flow01/)
 * (@flow01)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/calling-plugin-from-functionsphp/#post-1546634)
 * I’d like to include plugin with WordPress theme. It rather has to be inside theme’s
   directory to make it easier for people who download the theme.
 * Some plugins load just fine but I’m having problems with one that has several
   files. Is there any WordPress function to load it? Like activate_plugin or something
   like that?

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

The topic ‘Calling plugin from functions.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [flow01](https://wordpress.org/support/users/flow01/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/calling-plugin-from-functionsphp/#post-1546634)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
