Frameworks
Build, extend and run WordPress sites: themes, plugins, hooks, block editing, security, performance and deployment.
A path from installing WordPress locally to building classic and block themes, writing plugins against core APIs, and running sites securely and fast in production. It suits developers who know some HTML and PHP and want to work professionally with WordPress. Each subject links the official documentation.
The subjects follow the roadmap.sh WordPress roadmap.
WordPress is a PHP and MySQL content management system that powers a large share of the public web, from blogs to stores and membership sites. Before touching themes and plugins, get the request/response model clear and know which flavour of WordPress you are working with.
A browser resolves a domain through DNS, opens a connection to a server, sends a request and renders the HTML, CSS and JavaScript that comes back. WordPress sits on the server and builds that HTML per request.
The text protocol of methods (GET, POST), status codes, headers and bodies that browsers and servers speak. Caching headers, redirects and cookies are all HTTP features you will meet when debugging a site.
A content management system separates content (stored in a database) from presentation (templates), and gives non-developers an admin UI to publish. WordPress adds users, media, revisions and an extension system on top.
wordpress.org distributes the free, self-hosted software you install on your own server. wordpress.com is Automattic's hosted service built on it, where plugin and theme freedom depends on the paid plan.
Every theme ultimately emits HTML, CSS and JavaScript, and the block editor itself is a React application. You need enough front-end skill to write semantic templates, style them and add small interactions without fighting the browser.
Semantic markup (header, nav, main, article) and accessible forms. Theme templates and block markup are HTML with PHP or block comments woven in.
Selectors, the cascade, Flexbox, Grid and custom properties. Block themes generate CSS custom properties from theme.json, so knowing how variables cascade pays off directly.
Modern JavaScript with modules, promises and fetch. Custom blocks are written in JavaScript (usually JSX via @wordpress/scripts), and front-end features talk to the REST API with it.
WordPress core, themes and plugins run on PHP and store everything in a MySQL or MariaDB database. Reading core source and writing safe queries both depend on these two languages.
Functions, arrays, includes, superglobals and output buffering. WordPress mixes procedural APIs with classes, so be fluent in both styles and know which PHP version your host runs.
Selects, joins, indexes and the wp_posts/wp_postmeta schema. Most of the time you query through WordPress APIs, but reading slow-query logs and writing migrations requires real SQL.
A WordPress install is the core files, a database and a wp-config.php that joins them. Work locally first so you can break things freely, then mirror the same PHP and database versions you will run in production.
A free desktop app that spins up isolated WordPress sites with one click, switchable PHP versions, Mailpit for email and live links for sharing. The easiest starting point.
A bundled Apache, MariaDB and PHP stack for Windows, macOS and Linux. You create the database and unpack WordPress yourself, which teaches what an install really involves.
Varying Vagrant Vagrants: a Vagrant-based virtual machine aimed at core and plugin contributors, provisioned from a YAML config with multiple sites.
Run the official wordpress and mariadb images with Docker Compose for a reproducible environment you can commit. wp-env from core wraps this for plugin and theme development.
A theme controls how a site looks: templates, styles and presentational features. Only one theme is active at a time, and today themes come in several architectures depending on how much they lean on blocks.
Themes made entirely of HTML block templates plus theme.json, editable end to end in the Site Editor. The current default direction for new themes.
PHP template files driven by the template hierarchy, customised through the Customizer, widgets and menus. Still the majority of themes in the wild.
Classic PHP themes that opt into block features such as theme.json, block template parts or patterns without switching to the Site Editor. A common migration step.
Block themes that also keep working with the Customizer and classic menus, so users can manage them either way. An early transitional idea that is rarely built now.
Free themes from the wordpress.org directory or commercial ones from marketplaces. Check update history, reviews and code quality, and avoid nulled copies which often carry malware.
Plugins add functionality independent of the active theme: SEO, forms, e-commerce, custom post types. Rule of thumb: presentation goes in the theme, anything that should survive a theme switch goes in a plugin.
The root holds core files and wp-config.php; wp-admin and wp-includes are core and must never be edited; wp-content holds your themes, plugins, uploads and must-use plugins. Backups and migrations really only need wp-content plus the database.
How content gets authored shapes everything downstream, including how you build themes. Modern WordPress uses the block editor; legacy sites may still run the classic editor or a commercial page builder.
The React-based editor (Gutenberg) where content is composed of blocks serialised as HTML comments in post_content. Learn core blocks, patterns, and later how to register your own with block.json.
The TinyMCE editor from before WordPress 5.0, kept alive by the Classic Editor plugin. Content is a single HTML blob, with shortcodes for anything dynamic.
Tools like Elementor or Beaver Builder with their own drag-and-drop UI and storage format. Fast for clients, but they add weight and lock content into the builder.
Hooks are the event system that lets themes and plugins change WordPress without editing core. Callbacks attach with a priority (default 10) and an accepted-args count; learn to find the right hook by reading core source or using Query Monitor.
add_action() runs your code at a moment such as init, wp_enqueue_scripts or save_post; do_action() fires one. Actions do something and return nothing.
add_filter() receives a value, may change it and must return it, e.g. the_content or excerpt_length. Forgetting the return is the classic bug that blanks output.
The while ( have_posts() ) : the_post(); pattern that walks the main query and sets up globals so template tags like the_title() work. For secondary lists use a new WP_Query and call wp_reset_postdata() afterwards; use pre_get_posts to change the main query instead of query_posts().
Bracketed tags like [gallery] that call a PHP function registered with add_shortcode(). The callback must return its HTML, not echo it; in block content, blocks have mostly replaced them.
Load assets with wp_enqueue_style() and wp_enqueue_script() on the wp_enqueue_scripts (or admin_enqueue_scripts) hook, never with hard-coded tags. Declare dependencies and versions, and use the strategy argument for defer or async loading.
Register content types beyond posts and pages, such as products or events, with register_post_type() on init. Set show_in_rest for block-editor and API support, and flush rewrite rules on plugin activation, not on every request.
Ways of grouping content: categories (hierarchical) and tags (flat) are built in, and register_taxonomy() adds your own. Terms are stored in wp_terms and joined to posts through wp_term_relationships.
JSON endpoints under /wp-json/wp/v2/ for posts, pages, users, media and terms. The block editor uses it itself; external clients authenticate with application passwords or cookies plus a nonce.
WordPress has its own PHP, JavaScript, CSS, HTML and accessibility standards — tabs, Yoda conditions and prefixed globals among them. Enforce them with PHP_CodeSniffer and the WPCS ruleset rather than by eye.
Classic themes render PHP templates and expose settings through the Customizer; block themes are HTML templates of blocks plus theme.json, edited visually in the Site Editor. Choose block themes for new builds unless you depend on Customizer-era plugins or a team that only knows PHP templating.
A classic theme is a folder of PHP templates plus a stylesheet and a functions file. Learn how WordPress picks a template for each request and how to extend someone else's theme safely.
Required in every theme; its header comment (Theme Name, Version, Text Domain, Template for child themes) is how WordPress identifies it. It is not loaded automatically on the front end — enqueue it.
Runs on every request while the theme is active: register menus, sidebars, image sizes, add_theme_support() flags and enqueues here. Keep business logic in plugins.
Files such as index.php, single.php, archive.php, header.php and footer.php, pulled together with get_header(), get_template_part() and friends.
The fallback order WordPress follows to choose a file, e.g. single-product.php → single.php → singular.php → index.php. Knowing it removes most conditional logic from templates.
A theme that names a parent in its Template: header and overrides only the files it contains, so parent updates do not wipe your changes. Use get_stylesheet_directory() for child paths.
Classic themes give site owners control through admin features rather than code, and store extra content as metadata. These APIs are also what plugins use to add editable fields.
Declare locations with register_nav_menus() and print them with wp_nav_menu(); users assign menus in Appearance → Menus. Block themes replace this with the Navigation block.
The live-preview settings screen built from panels, sections, settings and controls via $wp_customize. Use postMessage transport for instant previews.
Draggable content units placed in sidebars registered with register_sidebar() and output with dynamic_sidebar(). Since 5.8 the widget screen uses blocks.
Functions such as the_title(), the_permalink() and get_the_post_thumbnail() that output or return data for the current post. the_* echoes, get_* returns — escape accordingly.
Key/value post metadata stored in wp_postmeta and handled with get_post_meta() and update_post_meta(). Register meta with register_post_meta() to expose it to the REST API.
Advanced Custom Fields: a plugin for building field groups (repeaters, relationships, images) through a UI and reading them with get_field(). Common on client sites; store field definitions as JSON in version control.
Custom panels on the edit screen added with add_meta_box(), saved on save_post after checking a nonce and capabilities. In the block editor, prefer registered meta with sidebar panels.
Block themes describe the whole site in block markup and a theme.json file, so users can edit headers, footers and templates in the Site Editor. Design tokens live in settings rather than scattered CSS.
style.css, theme.json, a templates/ folder of .html files (with index.html required), parts/ for template parts, patterns/ and optional styles/ variations.
The umbrella for the Site Editor, template editing, global styles and the theme blocks (site title, query loop, navigation) that make every part of a page editable with blocks.
Reusable layouts of blocks. Files in patterns/ with a PHP header register automatically; synced patterns update everywhere they are used.
Shared areas like header and footer stored as parts/*.html and declared in theme.json under templateParts with an area.
The styles section of theme.json sets colours, typography and spacing globally, per element and per block; JSON files in styles/ offer alternative style variations.
User edits in the Site Editor are saved to the database and take precedence over theme files, which surprises developers when file changes "do nothing". Reset or export them, and use child themes to override parent templates.
A plugin is a PHP file with a header comment in wp-content/plugins. Prefix everything, guard against direct access, and use activation, deactivation and uninstall hooks to set up and clean up.
A main file named after the plugin, uninstall.php, and folders such as includes/, admin/, public/, languages/ and build/. Load admin-only code conditionally with is_admin().
Core APIs that plugins use to do work beyond rendering: asynchronous requests, scheduled jobs, custom endpoints and cached data. Using them keeps your plugin compatible with hosts and other plugins.
Requests to admin-ajax.php with an action parameter routed to wp_ajax_{action} and wp_ajax_nopriv_{action} hooks. Verify a nonce; for new code a REST route is usually cleaner.
Add your own endpoints with register_rest_route() on rest_api_init, always with a permission_callback and argument schemas for validation and sanitisation.
WP-Cron schedules events with wp_schedule_event(), but only fires on page loads. On real sites set DISABLE_WP_CRON and trigger wp-cron.php from system cron.
set_transient() / get_transient() cache expensive results with an expiry, stored in the options table or a persistent object cache if one exists. Always handle a missing value.
Bigger plugins outgrow post meta and talk to other services. This is where data modelling, query safety and network error handling start to matter.
The global $wpdb object runs queries against the WordPress database; always pass user input through $wpdb->prepare() and use $wpdb->prefix for table names.
When data is relational or high-volume, create your own tables with dbDelta() on activation and track a schema version option for upgrades. Remember they are not in exports by default.
Call other services with the HTTP API (wp_remote_get(), wp_remote_post()), check is_wp_error() and status codes, set timeouts and cache responses in transients.
Most plugins need an admin screen and stored configuration. Core gives you menu registration, a settings framework and an options store so you do not hand-roll forms and persistence.
add_menu_page() and add_submenu_page() on admin_menu register screens, each gated by a capability such as manage_options.
An admin page whose form posts to options.php, rendered with settings_fields() and do_settings_sections(). Core then handles the nonce and saving.
register_setting(), add_settings_section() and add_settings_field() describe settings with sanitise callbacks, so validation and storage are consistent.
get_option(), update_option() and delete_option() store values in wp_options. Group related settings in one array option and disable autoload for large values.
WordPress is GPLv2-or-later, and code that extends it is generally expected to be GPL-compatible; premium products sell support and updates, not restrictive licences. Plan how your theme or plugin ships updates — the wordpress.org directory, or a licence server hooking into the update transients.
Speed comes from doing less work per request and sending fewer bytes. Measure first with real-user data and lab tools, then attack the biggest cost: usually uncached PHP, heavy images or plugin bloat.
WordPress generates sizes and srcset automatically and lazy-loads by default. Register only the sizes you use, serve WebP or AVIF, and keep the hero image eager with high fetch priority.
Load CSS and JS only on pages that need them, defer non-critical scripts, minify builds and drop unused plugins that enqueue globally.
Layer it: full-page caching (plugin, server or CDN), a persistent object cache with Redis or Memcached, and OPcache for PHP. Exclude carts and logged-in pages from page caching.
Keep autoloaded options small, clean expired transients and revisions, add indexes for heavy meta queries and watch the slow query log.
Serve static files, and ideally whole cached pages, from edge locations. Rewrite asset URLs or put the CDN in front of the origin and purge on publish.
Google's user-experience metrics: LCP for loading, INP for responsiveness and CLS for visual stability. Check field data in Search Console or PageSpeed Insights.
WordPress's popularity makes it a constant target, and most compromises come through outdated or vulnerable plugins and weak logins. Harden the server and application, then add monitoring so you notice problems quickly.
A web application firewall (plugin-level or at the edge) blocks malicious requests; scanners compare core files to checksums and look for injected code. wp core verify-checksums is a quick manual check.
Record logins, role changes, plugin installs and content edits so you can reconstruct what happened after an incident, and ship logs off the server.
Track disclosed vulnerabilities in the exact plugin and theme versions you run, using a vulnerability database or the alerts from your security tool, and patch fast.
Firewall rules that block exploitation of a known vulnerability before the vendor ships a fix or before you can update. A stopgap, not a replacement for updating.
Strong unique passwords, two-factor authentication, rate-limited logins, no admin username, and least privilege for every account.
Roles (Administrator, Editor, Author, Contributor, Subscriber) are bundles of capabilities. In code always check capabilities with current_user_can(), never role names, and add custom roles with add_role() on activation only.
The developer side of security: validate and sanitise input (sanitize_text_field()), escape on output (esc_html(), esc_url(), esc_attr()), verify nonces against CSRF and check capabilities on every action. Use $wpdb->prepare() for every query with variables.
Turn on WordPress's debug output in development, inspect what each request actually does, and back critical code with automated tests. Never leave debug display enabled in production.
Set WP_DEBUG true in wp-config.php to surface notices and deprecations; pair it with WP_DEBUG_LOG and WP_DEBUG_DISPLAY false to log silently, and SCRIPT_DEBUG for unminified core assets.
wp-content/debug.log plus the PHP and web server error logs. Protect debug.log from public access or move it outside the web root with a path in WP_DEBUG_LOG.
A developer plugin showing every database query, the hooks fired, HTTP calls, enqueued assets, template used and PHP errors for the current page — and which plugin caused each.
Unit and integration tests for plugins using the core test suite bootstrap, scaffolded with wp scaffold plugin-tests. Integration tests run against a real test database.
A backup is the database plus wp-content, stored off-site, automated and versioned. It only counts if you have restored it once: practise recovery on a staging copy before you need it.
Core minor releases auto-update by default; majors, plugins and themes can be configured per site. Test updates on staging, back up first, and stagger risky plugin updates rather than updating everything blind.
Keep watching after launch: Site Health for configuration issues, uptime checks, real-user Core Web Vitals and APM or slow-log data on the server. Regressions usually arrive with a new plugin or update.
Where WordPress runs decides how much control, performance and responsibility you have. Match the hosting tier to traffic, budget and how much server administration you want to own.
Many sites on one server with a control panel. Cheap and fine for small sites, but you share resources and have little control over PHP settings or caching.
A virtual server you administer yourself: full control over Nginx, PHP-FPM, Redis and the database, and full responsibility for patching and backups.
Hosts specialised in WordPress that handle caching, backups, staging, updates and security, at higher cost and with some restrictions on plugins.
Moving a site means copying files and database and fixing URLs, which are stored serialised in places. Use wp search-replace (serialisation-safe) rather than raw SQL find-and-replace, and check siteurl and home.
Keep themes, plugins and configuration in Git and deploy from CI instead of uploading over FTP. Typical pipelines install Composer and npm dependencies, build assets, rsync or deploy over SSH, then run WP-CLI tasks.
Professional WordPress teams treat a site like any other application: dependencies managed by Composer, config from environment variables and repetitive admin done from the command line.
The command-line tool for WordPress: install core, manage plugins and users, run search-replace, export the database and scaffold code. Essential for scripting and deployments.
PHP's dependency manager. With WordPress Packagist it can install plugins and themes as versioned dependencies alongside your PHP libraries.
A WordPress boilerplate from Roots with Composer-managed core and plugins, .env configuration and a cleaner folder layout separating web root from config.
A Roots starter theme using Laravel Blade templates, Vite builds and Tailwind, for developers who want a modern toolchain in classic themes.
Themes tagged accessibility-ready on wordpress.org must meet specific requirements, and WCAG 2.2 AA is the usual target. Use semantic HTML, keyboard-operable menus, visible focus, skip links and sufficient colour contrast.
Large plugins need structure beyond a single file of functions. Namespaces, classes, autoloading and a few well-chosen patterns make code testable and keep it from colliding with other plugins.
Classes, interfaces, traits, visibility, static members and typed properties. Hook object methods with [ $this, 'method' ] callables and keep constructors free of side effects.
Map a namespace to a folder with PSR-4 in composer.json and require vendor/autoload.php. Prefix bundled dependencies (e.g. with Strauss) to avoid version clashes with other plugins.
Patterns that fit WordPress well: a service container or simple dependency injection, repositories over $wpdb, and the observer pattern that hooks already are. Avoid singletons everywhere.
Wrap user-facing strings in __(), _e(), _n() or esc_html__() with your text domain, generate a POT file with wp i18n make-pot, and let translate.wordpress.org deliver translations. For JavaScript use wp_set_script_translations().
One install running a network of sites with shared users, plugins and themes, each site with its own tables. Code must be network-aware: switch_to_blog(), network activation and get_site_option().
WordPress as a content back end only, with a separate front end (Next.js, Astro and so on) fetching data through the REST API or WPGraphQL. You gain front-end freedom but lose themes, previews and many plugins unless you rebuild them.
Clean permalinks, real headings, descriptive titles and meta descriptions, XML sitemaps (built into core since 5.5), structured data and fast pages. SEO plugins manage the metadata; content quality still decides rankings.
WordPress is community-built, and contributing is the fastest way to deepen your skills and become known. Visible contributions also become a strong portfolio.
Teams cover core, Gutenberg, docs, translations, testing, support forums, accessibility and more. Start by picking a "good first bug" ticket or joining a contributor day.
A structured contribution programme where companies sponsor individuals, often students, to contribute for a set period, with mentoring and recognition on their wordpress.org profiles.
Publish plugins or themes to the directory, speak or volunteer at WordCamps and meetups, and write about what you learn — the ecosystem hires heavily from its contributors.