Crash Course on WordPress Plugin Development

Ever wanted to learn how to make a WordPress plugin quickly? Then this crash course on WordPress plugin development should be what you are looking for. In this article, I will demonstrate how to make a simple WordPress plugin in less than 30 minutes.

Plugin Files

First you need to organize your plugin’s file structure. A WordPress plugin can either be one single PHP file or many types of files in one directory, but if many, it must still include the main PHP file that defines the plugin. For our first, simple WordPress plugin, we will make a single PHP file plugin to keep it simple.

your_plugin.php

For this simple plugin, we will name Your Plugin and the PHP file named in traditional plugin format, will be your_plugin.php just for this tutorial. If you were creating an actual plugin that you were going to market, then you would want to check to be sure you have a unique name, but worry about that after you learn the basics;-) Here is the basic content that every plugin’s main .php file should start with:

<?php
/**
 * Plugin Name: Jafty Plugin
 * Plugin URI: http://jafty.com/blog/crash-course-on-wordpress-plugin-development/
 * Description: A brief description of how to create a Plugin.
 * Version: 1.0
 * Author: Ian L. of Jafty.com
 * Author URI: http://jafty.com
 * License: GPL2
 */
 ?>

Make sure above file is saved using UTF-8 encoding.

To continue from here and create a plugin that actually does something, follow the below link and finish up a simple plugin:

WordPress Plugin Development – Part 1 Tables

 

 

2 Replies to “Crash Course on WordPress Plugin Development”

Leave a Reply

Your email address will not be published. Required fields are marked *