WordPress

The world's most popular open-source CMS — now with a built-in AI client SDK, 196 native blocks, and full-site editing for PHP-powered publishing at any scale.

21.2Kstars
12.9Kforks
Custom / Unknown
PHP

WordPress is the open-source content management system that powers over 43% of the web, built on PHP and MySQL/MariaDB. It gives individuals, businesses, and enterprises a complete publishing platform: a block-based editor, an extensible theme system, a plugin API with tens of thousands of extensions, and a built-in REST API that exposes all content types automatically.

Version 7.x introduces a bundled PHP AI Client SDK with an OpenAI-compatible provider interface, an Abilities API for registering AI capabilities, and a fluent prompt builder — making generative AI a first-class citizen in the WordPress ecosystem without requiring third-party plugins. The block editor now includes 196 native blocks covering content, layout, interactive, and media use cases.

Self-hosting WordPress means running PHP 7.4+ (8.3 recommended) with MySQL 5.5.5+ or MariaDB 10.6+, Apache mod_rewrite or Nginx, and HTTPS. The famous five-minute installation wizard handles database initialization and wp-config.php generation. Multisite networks allow a single WordPress install to manage hundreds of independent sites with shared core files, users, and plugins.

The codebase is developed on Subversion with a Git mirror at WordPress/WordPress. Active development, patches, and pull requests happen at WordPress/wordpress-develop on GitHub, with Trac used for issue tracking. WP-CLI enables full command-line administration, scripting, and CI/CD integration.

What You Get

  • Gutenberg Block Editor - A compositional, drag-and-drop content editor with 196 native blocks including Accordion, Breadcrumbs, Avatar, MathML, and Time to Read, supporting real-time preview, pattern libraries, and inline commenting.
  • Full Site Editing (FSE) - A theme architecture that lets site owners design every template area — header, footer, sidebar, archive pages — using the same block editor interface without touching PHP templates.
  • Plugin API with Hooks - An action/filter hook system that lets plugins and themes intercept and modify nearly every WordPress behavior without forking core code, backed by a WP_Hook registry.
  • Built-in REST API - Automatic JSON REST endpoints for all post types, taxonomies, users, and comments — enabling headless WordPress, mobile apps, and third-party integrations without custom routing.
  • PHP AI Client SDK - A bundled, provider-agnostic AI integration layer with an OpenAI-compatible adapter, Abilities API for registering AI capabilities, and a fluent WP_AI_Client_Prompt_Builder supporting text and image generation.
  • Multisite Network - A single WordPress installation managing hundreds of independent sites with shared themes, plugins, and user roles, controllable from a unified super-admin dashboard.
  • Automatic Updates & Recovery - One-click core, plugin, and theme updates with built-in fatal error recovery mode that deactivates broken plugins automatically to keep sites online.
  • Font Library - A REST API-backed font management system for uploading, activating, and deactivating web fonts site-wide without editing CSS files.

Common Use Cases

  • Publishing a content-rich blog - A journalist uses the block editor’s Paragraph, Image, Pullquote, and Time to Read blocks to compose long-form articles with rich formatting and accurate reading-time estimates, published instantly.
  • Running an e-commerce store - A shop owner installs WooCommerce (WordPress plugin) to add product listings, cart, checkout, and payment processing on top of an existing WordPress site without a separate platform.
  • Building a headless CMS - A development team exposes WordPress content via its built-in REST API to a Next.js or Astro frontend, using WordPress purely as a content management backend while controlling the presentation layer.
  • Managing a multisite network - A university IT department runs a WordPress Multisite network hosting dozens of departmental sites, sharing a single plugin and theme installation while giving each department its own admin panel.
  • Integrating AI-powered content tools - A media company uses the WordPress Abilities API and AI Client SDK to register custom AI capabilities for automated content summarization, image alt-text generation, and SEO suggestions within the editor.
  • Creating a membership or LMS site - A course creator uses free WordPress plugins for learning management and membership gating to deliver paid courses, quizzes, and certificates on a self-hosted WordPress install.

Under The Hood

Architecture WordPress bootstraps via a sequential require chain: wp-load.php loads wp-config.php and then wp-settings.php, which includes hundreds of individual files to register core functions, classes, and hooks. A global WP_Hook registry mediates all actions and filters, creating decentralized event flows between core, plugins, and themes without explicit dependency injection. Version 7.x introduces pockets of modern architecture: the bundled PHP AI Client uses a PSR-influenced provider registry with interfaces, DTOs, and typed exceptions; the Abilities API uses class-based registries with categories; the block system manages 196 blocks through a central registry. The overall structure remains a procedural monolith with global state, but new subsystems demonstrate clear architectural modernization.

Tech Stack WordPress runs on PHP 7.4 or later (PHP 8.3 recommended) with MySQL 5.5.5+/MariaDB 10.6+ as the database, accessed through a custom WPDB abstraction layer with built-in SQL injection protection. The Gutenberg block editor is built with React and Redux, bundled via Webpack and Babel. Email is handled by PHPMailer. The new PHP AI Client SDK provides an OpenAI-compatible provider interface supporting text and image generation through abstract base classes for easy provider extension. The REST API is fully built-in, and WP-CLI enables command-line administration and CI/CD integration. Apache mod_rewrite or Nginx handles URL routing.

Code Quality This repository is a Subversion mirror — test suites live in the wordpress-develop repository — so no test files are present here. Core PHP files carry extensive PHPDoc documentation: functions.php at over nine thousand lines has abundant inline comments and docblocks covering every parameter and return type. Error handling uses the WP_Error pattern throughout core, while the AI Client layer uses typed PSR-style exceptions for more granular failure handling. Naming follows WordPress coding standards with consistent snake_case. Dynamic PHP typing is used throughout the legacy codebase, though newer subsystems like the AI Client adopt strict type declarations. No static analysis configuration is present in the mirror.

What Makes It Unique WordPress 7.x ships a built-in PHP AI Client SDK with a provider-agnostic architecture — the OpenAI-compatible abstract classes allow any provider exposing an OpenAI-style API to integrate without custom adapters. The Abilities API introduces a first-class capability registration system so plugins can advertise and discover AI features. With 196 native Gutenberg blocks and Full Site Editing, WordPress offers the most comprehensive block-based editing system of any open-source CMS. The backward-compatible template hierarchy preserves decades of theme investments across every major version. Multisite networking, Font Library management, and the automatic recovery mode collectively give self-hosters enterprise-grade tooling in a consumer-accessible package.

Self-Hosting

WordPress is released under the GNU General Public License version 2 or later (GPL-2.0+). This is a strong copyleft license: you can use WordPress commercially, modify it freely, and distribute it — but any derivative work you distribute must also be released under the GPL. For self-hosters running WordPress as a private internal tool or SaaS backend without distributing the software, the GPL imposes no redistribution requirements. Themes and plugins that directly incorporate WordPress code are also subject to the GPL, which is why the WordPress plugin and theme ecosystems are predominantly open-source.

Operating WordPress yourself means owning the full infrastructure stack. You are responsible for provisioning a web server (Apache or Nginx), PHP runtime (7.4+, ideally 8.3), and a MySQL or MariaDB database. Day-to-day operations include applying core, plugin, and theme updates — WordPress ships one-click automatic updates, but verifying compatibility before applying them in production requires staging environments. Database backups, SSL certificate renewal, server security patching, and scaling under traffic spikes all fall to the operator. For multisite networks or high-traffic installs, object caching with Redis or Memcached and a CDN for static assets become operational necessities rather than optional optimizations.

Managed WordPress hosting (WordPress.com Business, WP Engine, Kinsta, Pressable, and others) absorbs the operational burden in exchange for monthly fees. Managed platforms handle automatic updates, daily backups, CDN, WAF, staging environments, and support — capabilities that require significant DevOps investment to replicate self-hosted. The managed tiers also offer guaranteed uptime SLAs, which self-hosters must engineer independently. For organizations without dedicated server operations capacity, the gap between self-hosted and managed WordPress is substantial; for teams with infrastructure expertise, the self-hosted path provides full control over data residency, customization depth, and long-term cost.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search