Sometimes we need to create a MU plugin (Must Use) WordPress plugin in your WordPress based project. In this tutorial, I will explain How to Create MU (Must Use) WordPress Plugin.
WordPress MU Plugin is also known as Must-Use plugins, which are installed in a special directory inside the wp-content folder of your WordPress website. It is automatically enabled on all of your site in that installation. MU-Plugins are not listed in the default plugin lists in WordPress admin panel and It can’t be disabled until you have not remove the plugin from must use directory.
Must-Use plugin have many features, Below is the some features of WordPress MU-Plugin:
Let’s create a simple MU-Plugin. In this example, I will create a WordPress MU-Plugin with an example, so that it will help you to understand more.
Step 1) Go to the wp-content folder and create a mu-plugins folder like
Step 2) Create a file named “hello-world.php” inside the mu-plugins folder.
Step 3) Now copy the below code and add inside the “hello-world.php” file.
Plugin Name: My First MU Plugin
Description: This is just a test.
Author: Prem Tiwari
Author URI: http://freewebmentor.com
After saved the file, it will automatically be enabled on your WordPress site and not listed inside the plugins list in Admin panel.
Thank you for giving your time to the FreeWebMentor community. If you still need any help, feel free to add your comments in below comment section. I will be happy to help.
Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials and also don’t forget to subscribe my blog to get all future tutorials directly in your mail box.