How to Create Plugin in WordPress?
Step 1
- Open the plugin Folder inside the wp-content using this path
- C:\xampp\htdocs\shairy_portfolio\wp-content\plugins
- Create a new folder with Unique Name inside above path and open it
- Now create a new php file with the same name of folder. It’s recommended to use the same name otherwise we can create different also.
- /C:/xampp/htdocs/shairy_portfolio/wp-content/plugins/shairy-plugin/shairy-plugin.php
- Create one more file index.php with in the same folder. This file must be blank; this is created only for protection from hacking.
While performing above steps you can check no plugin will be appearing in Admin panel; if you want this plugin appear in your admin panel then create DOC LOGS in shairy-plugin. Php
/**
* Plugin Name: Shairy Plugin
* Author: Er. Shairy Kalra
* Author uri: https://ershairykalra.com/
* Version:1.0.0
* Description: This is the basic plugin to understand the functionality how a plugin is created
*/
Now plugin is appearing in your Admin Panel like this