Home/Courses/Your First WordPress Plugin

Intermediate, Blue run Build

Build your first WordPress plugin - properly

Go from "there's a plugin for that" to writing your own. Hooks, shortcodes, settings, custom post types, an Elementor widget and the security habits real developers use.

Recording now. Join the waitlist and you will hear first, with an early-bird price.

5Modules
20Lessons
2 hrsVideo
1Hours of 1:1 included
IntermediateLevel
Mini coursePractical task and certificate

Sound familiar?

Most sites end up with dozens of plugins for small jobs, each adding weight, cost and risk. Learning to write your own small, focused plugins is the step from site builder to developer, but most tutorials either stop at "hello world" or skip the security parts that matter.

What you'll build

"Simple Testimonials", a complete plugin with a custom post type, secure custom fields, a settings page, a shortcode and an Elementor widget, packaged and versioned. Then you will build your own "Opening Hours" plugin on your own.

By the end you'll be able to

  • Create a correctly structured plugin with a proper header, prefixing and activation/deactivation routines.
  • Use actions and filters to change WordPress behaviour without editing core or theme files.
  • Build shortcodes that output dynamic content safely.
  • Register a custom post type with custom fields, and a settings page using the Settings API.
  • Load CSS and JavaScript the WordPress way, only where it is needed.
  • Apply the core security habits: capability checks, nonces, sanitising input and escaping output.
  • Build a simple Elementor widget that displays your plugin's content.
  • Package, version and ship your plugin, and understand how updates reach a site.

Practical task

Put it to work on your own site

Finish with a practical task on your own site, check it against the published marking guide and unlock your completion certificate.

Who it's for

  • Career changer / aspiring freelancer. can build sites with Elementor but keeps hitting "you need a plugin for that". He wants to write small custom plugins for clients instead of stacking third-party ones, and to have something to show in his portfolio.
  • Hobbyist. enjoys tinkering and wants to understand what is happening behind the dashboard by building something real.
  • Marketer with an inherited site. occasionally needs to read or tweak a custom plugin a previous developer left behind and wants to understand hooks, shortcodes and settings well enough to do it safely.

Who it's not for

  • Complete beginners who have never seen PHP (start with the HTML/CSS course and the free PHP primer), or experienced developers looking for advanced topics such as the REST API, custom blocks, React or unit testing.

Curriculum

5 modules and 20 short lessons, about 2 hrs of video. Every module ends with a quick quiz and an exercise on your own site.

01Plugin foundations4 lessons, 22 mins

A working, correctly structured plugin skeleton is installed and activated on your local site.

  1. What a plugin is and when to write one5 min
  2. Setting up a local development environment6 min
  3. The plugin header and file structure6 min
  4. Prefixing, activation and deactivation hooks5 min
02Hooks and shortcodes4 lessons, 24 mins

You can use actions, filters and shortcodes confidently, and know how to find the right hook.

  1. Actions: doing something at the right moment6 min
  2. Filters: changing data on its way through6 min
  3. Finding hooks4 min
  4. Your first shortcode8 min
03Data, settings, assets and security5 lessons, 38 mins

The plugin stores testimonials in a custom post type with a secure meta box, has a settings page, and loads its own CSS correctly.

  1. Registering a custom post type7 min
  2. A meta box for custom fields8 min
  3. Security essentials: capabilities, nonces, sanitising and escaping9 min
  4. A settings page with the Settings API8 min
  5. Enqueueing CSS and JavaScript properly6 min
04A simple Elementor widget3 lessons, 18 mins

Your testimonials appear in a custom Elementor widget with editable controls.

  1. How Elementor widgets fit into a plugin5 min
  2. Building the widget class8 min
  3. Rendering safely and reusing your code5 min
05Packaging, releasing and updating4 lessons, 18 mins

Your plugin is tidy, translatable, checked and zipped, with a plan for updates.

  1. Making it translatable and tidy4 min
  2. uninstall.php and cleaning up after yourself4 min
  3. Checking and packaging5 min
  4. How updates reach a site5 min

Lesson lengths are estimates and may change slightly when the course is recorded. Every lesson is re-recorded or annotated when the tools change, free for everyone with an active course.

Everything included

  • Around 2 hours of video in 20 lessons
  • 1 hour of 1:1 live tutoring with Sarfraj (use within 12 months)
  • Full source code for every module
  • A starter boilerplate
  • A security cheat sheet
  • A release checklist
  • Quizzes
  • A practical task and certificate

Before you start

PHP basics (variables, arrays, functions, if/else, loops) OR completion of the Begin2Code HTML/CSS course plus the free "PHP in 30 minutes" primer lesson. Comfortable installing WordPress plugins. Elementor (free) installed for Module 4.

Your tutor: Sarfraj

Sarfraj is a web developer with over 10 years of experience who specialises in WordPress plugins and custom web apps built on WordPress. He teaches the plugin course, reviews your code and gives your included one-to-one tutoring.

More about Sarfraj

Be first in when it opens

This course is being recorded now. Waitlist members hear first and get an early-bird price.

Your First WordPress Plugin

£199£398launch sale price

Leave your email and you will hear first when it opens, with an early-bird price for the waitlist.

Extra 1:1 time

£60an hour, packs from £275

Your course includes personal tutoring. Need more? Book extra one-to-one lessons on your own site, with 10% off packs for course students.

1:1 lessons

Guarantee

30days money back

Try the course for 30 days. If it is not for you, email us for a full refund.

Refund policy

Questions about this course

Anything else? Send me a message or book a 30-minute taster lesson.

How much PHP do I need?

Variables, arrays, functions and if statements. If you have done the HTML/CSS course, the free PHP primer lesson covers enough to start, and every line of code in the course is explained.

Do I need Elementor Pro?

No. The free version of Elementor is enough for Module 4, and the rest of the course does not need Elementor at all.

Can I sell or use the plugins I build?

Yes. The course code is yours to use on your own and client sites. Plugins distributed publicly should be GPL-compatible, which the course explains.

Will this teach me to build Gutenberg blocks?

Not in this course. It focuses on the PHP foundations every plugin needs. Blocks are a natural next step once these are solid.

Free guides on this topic

Start with these, then take the course when you want it in order, with help.

All guides

Get on the list. Start first.

This course is being recorded now. Join the waitlist and you will be first to hear when it opens, at the £199 sale price (usually £398).