Welcome to the definitive guide of WordPress Plugin Development. Whether you’re a non-programmer, a novice developer or a pro WordPress developer, we hope that this guide will help you to find the answers to all your plugin development questions.
Why we are writing this guide?
At WildProgrammers, we have been working on many cool projects like small plugin development to maintaining a large scale WordPress powered e-commerce website. Our stakeholders come to us with varied requirements, starting from as small as adding an informative product description to their booking plugin to as complex as creating an entirely new plugin to the auto-suggest product add-ons. Whatever the project scale maybe, because of the constantly evolving code, we always feel the need to go back to the WordPress basics to do the things in right fashion.
Moreover, there are numerous cases where we worked on an existing project and saw a lot of scrap code because of a misunderstanding of how WordPress works at the core. So we decided to inspect this problem a bit and found out with some interesting results. There are basically two types of WordPress tutorials in the online market.
1) Very detailed one – Overwhelming and of course too boring if you are a novice
2) Very shallow one – Not too efficient
Hence, we decided to write something which is a combination of both and which can help you to understand the basics of WordPress plugin development, without going in much internals, unless you are really ready for that.
If this feels something interesting or something you were looking for, read on and we will try our best to help you understand the basics with only what you need to know.
Why do we need to make plugins?
The simple answer is reusability and maintainability. If you are using WordPress from some time, you might be aware that, mostly, WordPress is divided into 3 parts, i.e.
- Core – Maintained by the WordPress family. DON’T add/change code here
- Themes – Gives awesome styles to our site
- Plugins – Gives additional functionality to WordPress

Instead of creating additional plugin, you may be tempted to add some code in the WordPress core. But this is not a good approach. Let me explain why. Assume you are using some eCommerce shop and you need a custom solution providing discounts to the user. Let’s say for this requirement you modify the WordPress core and push to the WordPress repository so that everyone can use it.
Now on the other hand, if a person B is hosting a WordPress powered blogging website, then he might don’t need this functionality at all – as there is nothing like eCommerce site he is providing. Hence this will be an unnecessary code for him, which will just increase the website load time and nothing else.
Now, provided that WordPress is used by around 30% of the entire web and every website has there owned specific requirements, if everyone will start adding their own code, there will be a lot and lot of scrap codes for each and everyone and this will make WordPress almost unusable.
Hence, the team at WordPress came up with a unique approach to this problem. They wrote the WordPress core, with the most basic functionalities and provided the hooks (the power to extend WordPress) for the developers.
So, when anyone says that he is writing a plugin, what he essentially means is he is using the WordPress(or custom) hooks, to extend the WordPress to add new functionalities(Don’t worry if the terms like hooks and custom functionalities don’t make a sense to you. We will get back to that a little later). By providing the hooks, WordPress family makes the WordPress maintainable – so that they can change the core without affecting any plugin.
Also, as the developer can create a separate stand-alone plugin, it can be easily zipped and re-used by someone else, which is the main reason behind WordPress’ popularity. As the plugin can be re-used and hosted as a separate free or paid plugin, developers across the world created millions of plugins, as per their requirement and hosted them on popular sites including WordPres.org
Now you may ask, why we should write in plugins and not themes. A simple answer to this question is the purpose.
Developers at WordPress created the themes and plugins directory to add custom styling and functionalities to your website respectively. Hence you should only create a WordPress plugin if you want to achieve some additional functionality to your website, for e.g. adding a custom post type like documents.
This is all for this article. We will start taking a dive inside the plugin basics from the next article. Until then HAPPY CODING!!!