WordPress Multisite offers the opportunity to load plugins automatically by a specific folder without any click in the backend. These plugins can not be deactivated via the admin interface too, which is a quite useful function when you work in the development or with clients.
Currently wordpress can merely load plugins which lie in the root file of the directory and which don’t cause any processing of plugins in subfolders. You can find the directory in the default file of wordpress under /wp-content/mu-plugins/. The file you need for this doesn’t exist automatically and so you need to create it. Alternatively you can define the file via absolute terms within wp-config.php, like shown in the following example:
[crayon-5a2eba361b1a4249155126 inline="true" ]
// Custom MU plugin directory
define( 'WPMU_PLUGIN_DIR', dirname( __FILE__ ) . '/wpmu-plugins' );
define( 'WPMU_PLUGIN_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wpmu-plugins' );
Each and every plugin within this directory will be acitivated in the Single-Mode and so it works actively on every site of the network.
Generally I use the file for the plugins mostly because of the overview. And, for example, git-projects are also easier to handle. In this regard a little plugin arose for the local development einvironment, which upgrades to this exact function and also acitvates every plugin in the subfolders. The plugin excludes other plugins in the root directory so that there aren’t any conflicts with the default function of wordpress.
Meanwhile I also use this plugin for the projects of clients or for projects of my own, because it makes the management of the plugins I control easier.
The plugin can be found on GitHub. You have to copy the file directly, without any folder, in the directory of the „most used“ plugins. An activation isn’t necessary. After that you should reload all the plugins which lie within the directory and which are managed by folders. Now the plugin possesses a simple cache, which will be emptied, when you visit the plugin-list in the network-admin-area and activate the „most used“ plugins-tab. Also the cache is deactivated when the absolute term WP_DEBUG is active and TRUE is settled.
Improvements and changes are always welcomed! Alternatively you can use the Issue Liste on GitHub to tell us bugreports or extension wishes.
New Plugin: Slack Connector - Connect WordPress, WooCommerce and Slackby Michael Firnkes
Initially we merely wanted to optimize our own Slack-processes. With automated notifications from our MarkettPress shop, the blog and our forums. The resul ...Read more
Inpsyde is the first WordPress.com VIP partner in Germanyby Michael Firnkes
Automattic has given us the title of WordPress.com VIP Service Partner, the first in Germany, Austria and Switzerland. Worldwide, there are only eleven com ...Read more
Inpsyde is a WooExperts Gold Partner of WooCommerceby Michael Firnkes
A few weeks ago, Inpsyde GmbH with MarketPress became a certified WooExperts Gold Partner. This is confirmation from WooThemes of our agency’s know-h ...Read more
BackWPup Pro: Secure WordPress Backup with Google Driveby Michael Firnkes
The Pro version of our BackWPup plugin supports the backup of WordPress databases and files to Google Drive. But how do you set something like that up? And ...Read more