Learn how to create a plugin in less than 2 minutes

Entrepreneur, teacher, developer.
Search for a command to run...

Entrepreneur, teacher, developer.
No comments yet. Be the first to comment.
In this series, we will explore what a plugin is, why you would use one, and how to create one from scratch.
In the previous article — we walked through creating a plugin by only adding a folder, a file, and the plugin header information at the top. This article will create functionality for our plugin to help demonstrate how you can build your own WordPres...
If you can sum up Web3 in one word — I think most people would say "decentralized." While I do enjoy the idea of a decentralized web — I doubt that it will truly be "decentralized" as massive whales, corporations, and governments move in to invest th...

Whether it's a Zoom meeting or recorded content — I've been asked on several occasions what gear I use — and each time, I piecemeal a list and send it. So — I've decided to break down each piece of audio gear that I use and its purpose so anyone inte...

In previous articles, we stepped through making a plugin from the folder to the file and adding some practical functionality. This article will dive in much deeper and learn how to create a plugin and prepare it to release in the world for production...

In the previous article — we walked through creating a plugin by only adding a folder, a file, and the plugin header information at the top. This article will create functionality for our plugin to help demonstrate how you can build your own WordPres...

WordPress plugins can be as simple or complex as you want them to be — and they are ridiculously easy to create, like, super easy.
In this article — I will walk you through creating a WordPress plugin in a way that I've come to learn, and hopefully, by the end of this article, you, too, will be able to start creating your own WordPress plugins.
There's minimum prep work involved in creating a plugin:
In the plugins directory, create a folder and call it whatever you want to call it. As a best practice, make sure it's lowercase, only letters, and no spaces.
Now — create a PHP file and as a best practice, name it the same way you did with the folder.
For WordPress to detect your plugin, you must include the plugin header at the top of the file you just created. You can use the example below and replace "YOUR PLUGIN NAME" with anything.
<?php
/**
* Plugin Name: YOUR PLUGIN NAME
*/
Navigate to your plugins menu in the backend of WordPress, and you should see the new plugin appear in the list — go ahead and activate it!
There — that's it, you've created a plugin!

Although plugins require a lot more than that to be of any use — the point I want to illustrate to you here is that a plugin is no more than a folder that will end up containing one or more PHP files and other dependencies that extend WordPress.
This concept is true in almost any CMS platform and JavaScript frameworks such as React, Vue, Angular, Svelte, etc.
This is a series that will teach you how to build a plugin from scratch.
We will get out hands dirty, and by the end of this series, you should be able to take an idea that you have and turn it into a plugin yourself!
Scroll down to find the other articles in this series.