How to create a plugin in WordPress?

Creating a plugin in WordPress is about the easiest possible thing to do.
Install WordPress, go to the wp-content\plugins directory under the WordPress installation and create a directory with the exact name that you want to use for your plugin. Let us say we want a plugin called Test Plugin.

Next, add a php file to the newly created folder with the exact name as the name of the plugin with the .php extension. In our case this would be Test Plugin.php.
Add the following content and then save the file.

Plugin Name: Test Plugin
Description: This a test Plugin
Author: Champak Roy
Plugin URI:
Author URI:
Version: 1.0
License: GPLv2

Go to the WordPress site, login as an admin and open the installed plugins page. Our plugin should be available.

The plugin can be activated and deactivated now.

if you want your plugin to be installed the zip format way. Create a zip file and place it somewhere on your hard disk. Then go to the install plugin page.

Leave a Reply