Building a Plugin for WordPress

Home / Courses / Building a Plugin for WordPress
Building a Plugin for WordPress

This course will take you through creating a WordPress plugin for your site using PSR-4 – PHP Standard Recommendation – 4. This recommendation specifies the process of autoloading classes from the file paths. The standard used in this tutorial also specifies where to place files that will be autoloaded once our plugin is activated. 

Without further ado, let’s jump into the course and create our first custom WordPress plugin.

Course pre-requisites

Basic PHP and Object Oriented Programming.

Basic PHP and Object Oriented Programming.

You should have some background knowledge in PHP and Object Oriented Programming Principles

Composer Package Manager for PHP


You should know what composer is for you to really make the most out of the course. Composer is a package manager for PHP, similar to NPM for JavaScript.


WordPress – Plugins and Blocks

Since we will be creating a plugin, you need to have an idea or two about plugins in WordPress. You also need to know what Blocks are since the tool we will be creating will be on how to display the reusable block.

The course pre-requisites discussed above are very easy to learn and acquire knowledge on. Take off a few minutes to look them up and grasp the basic concepts about them.

Who is this course for?

This course is meant for anyone aspiring to build their own WordPress plugin. It could be a custom plugin with custom functions for a specific website or that commercial plugin that you wish to sell.

What will you learn?

This course will guide you through how to best organise folders and files in your plugin.

You will learn how to structure plugins the right way (or the MRK WP way) that should grow from small to large projects without failure.

At the end of this course, you will have an idea of how the autoloading for the classes works in PSR-4.

In addition to this, your plugin will also display the reusable blocks menu in the WP Admin area

Tools to be used

Local for WP

WP Local

Local enables you to set up a local WordPress development environment. With this tool, you can connect your website hosted via WP Engine to your local development environment.

Local enables you to pull down your site from the server to your local environment and vice versa. You can also push files from your local environment to the WP Engine server.

You can download Local from their website.

GITHUB - We use this to share our code with you.


We will be using Github for version control and sharing all our code from these tutorials. You can find MRKWP on Github via this link:

VSCode is our editor of choice.

VS Code – Code Editor

You will need a code editor to write and edit your code. In this tutorial, we will be using the VS Code. You can download it via this link:

You can use any other code editor you are more comfortable/familiar with.

Now let’s jump into the course.