When most people think of WordPress they think of it as a blogging software, but it can do a lot more than that. It’s very powerful and flexible and thanks to its plugin system which allows you to extend pretty much anything you can think of.

Creating a WordPress plugin is very easy. WordPress looks for its plugins in the wp-content/plugins directory. To create a plugin, you need to create a directory where you will place the files that your plugin requires to operate. Let’s call this directory simple-plugin.

A simple plugin can have all its content in a single PHP file. This file needs to contain a comment section describing the plugin, let’s create a PHP file called simple-plugin.php with the following content:


 Plugin Name: My Simple Plugin
 Plugin URI: https://example.com
 Description: the world simplest plugin
 Author: Your name
 Version: 1.0
 Author URI: http://example.com/user

If you upload this directory with this file inside to the wp-content/plugins directory of your WordPress installation and go to the Plugins page in the WP admin site, you will see your plugin listed.

Next, you need to add some logic to your plugin. WordPress provides a bunch of hooks that you can attach to and insert your logic. Let’s add a hook to our previous simple-plugin.php file:

function simple_footer() {
// insert your code here.

add_action('wp_footer', 'simple_footer');

The above code allows a developer to create a plugin that hooks a function to the footer of the WP site.

Finally, if you want to do more in your plugin, we recommend that you take a look at the official documentation plus a bunch of online tutorials like this one.