How to Create Your Own WordPress Plugin?

Creating your own WordPress Plugin can be difficult or easy, depending on what functionalities you want to achieve. However, creating your very first plugin that does nothing is extremely easy.

All you need to do is to:

  1. Create a folder with the plugin name in the “plugins” folder within “wp-content” folder
  2. Create a php file with the same name as the plugin folder

For example, if you want to create a plugin named “My First Plugin”, you will need to create:

  1. a my-first-plugin folder
  2. a my-first-plugin.php within the my-first-plugin folder

Then open the php file and add the following block of code:


<?php
/**
 * Plugin Name: My First Plugin
 * Description: This is my very first plugin
 * Version: 1.0
 * Author: WP Learner
 * Author URI: http://wplearner.org
 * License: GPL2
 */

Of course, you will need to change the values of the items in this block of code. Once these are ready, you can go into the admin area of your WordPress website and click on the “Plugins” item. You will be able to see your plugin listed there and you can activate it right now.

Congratulations on creating your very first WordPress plugin!

0

Comments


Please login to post comments.

Login thru Twitter / Facebook

 

Log in with Facebook