Skip to main content

PHP for WordPress

Course Scope

This section teaches PHP with WordPress as the target runtime. The goal is not generic PHP theory first; the goal is to write safe, maintainable PHP that works inside themes, plugins, admin screens, forms, AJAX handlers, REST routes, and production WordPress sites.

Modules

Learning Goals

  • Understand enough PHP syntax to read and write WordPress code confidently.
  • Use WordPress hooks, template tags, queries, plugin headers, nonces, capabilities, and escaping correctly.
  • Build small features as plugins instead of editing core or overloading theme files.
  • Handle user input safely from forms, AJAX requests, REST endpoints, and admin pages.
  • Debug PHP and WordPress problems without guessing.
  • Structure larger WordPress codebases with classes, custom data types, background jobs, integrations, tests, and deployment habits.

Course Usage

Recommended Learning Order

Follow the modules in numeric order if you are new to PHP. If you already know PHP, start with WordPress Execution Model, then focus on hooks, security, database access, and production practices.

Use the PHP Cheatsheet as a lookup reference while building. It is organized by topic rather than lesson order.

Production Rule

WordPress PHP should be boring, explicit, and defensive: validate input, check permissions, escape output, avoid direct core edits, and keep site-specific behavior in small plugins or child themes.