Where to save common libraries?

I have a multiple-site WordPress install. I have decided to centralize as many of my libraries as possible into one spot, for obvious organizational reasons, and in order to reduce bloating. Many of those libraries can be used both in plugins and themes. My first idea is to create a ‘myLibs‘ (or other name) directory inside wp-content where I would save all those libraries. Anybody has a better idea? Would there be any reasons NOT to do this?

1 Answer
1

I would recommend creating a plugin that holds all of your libraries. In the main plugin file, set a constant that defines the path to the plugin folder so you can easily include the files with your other plugins/themes.

Leave a Comment