Skip to content

How to create a PSR-4 WordPress Plugin for reusable blocks

Jul 2022·25:36·369 views·Matt Knighton

Walkthrough Overview

About This Video Guide

In this video, you will learn how to create a PSR-4 WordPress Plugin. You will start by creating the directory structure for your plugin and then move on to creating the basic files required for a functioning plugin. After that, you will create a custom block and add it to your plugin. Finally, you will test your plugin and make sure it is working correctly.

View the lesson on my website here:

https://www.mrkwp.com/lessons/building-the-reusable-block-plugin/

All links to the relevant resources:

https://localwp.com/ - We use this for our editing environment. https://github.com/MRKWP/Reusable-Blocks-PSR4/ - reference to the code in this tutorial. https://www.billerickson.net/reusable-blocks-accessible-in-wordpress-admin-area/ - Tutorial on reusable blocks from Bill Erickson

Core Focus Areas

  • 1Practical, production-tested techniques tailored for WordPress and modern tooling.
  • 2Stripping away fragile dependencies so your site stays fast and resilient.
  • 3Workflows structured so your internal team can maintain and own them long-term.

More Practical Walkthroughs

Explore step-by-step video tutorials and technical walkthroughs.

View all videos ↗
Using Gemini Nano Banana to Match a colour profile without degredation.
4:31
Apr 2026 · 38 views

Using Gemini Nano Banana to Match a colour profile without degredation.

4:31Watch Video
Fix ChatGPT Emoji not saving in WordPress
3:22
Mar 2025 · 510 views

Fix ChatGPT Emoji not saving in WordPress

3:22Watch Video
Have Multiple Sidebars in WordPress with Elements and Kadence Pro
8:27
Feb 2025 · 555 views

Have Multiple Sidebars in WordPress with Elements and Kadence Pro

8:27Watch Video

Let’s figure it out together

You don’t have to build alone.

A little guidance. A good conversation. A better next step.

Work with me

Start with a 20-minute call. I read every enquiry myself.