Corcel transforms a remote WordPress site into a local data source by wrapping its REST API in an object-relational mapper. As a headless CMS bridge, it synchronizes remote posts, pages, users, and options into local models, enabling offline querying and manipulation from external PHP applications.
The library uses pluggable adapters to fetch different WordPress resource types and a schema-based translation layer that converts WordPress post types and fields into local definitions. It validates user credentials against a remote WordPress database and integrates with the host framework’s authentication system. A shortcode parsing engine registers custom handlers and renders shortcodes within fetched content, while the remote-to-local state synchronization keeps local data consistent with the WordPress backend.
Beyond the core identity, Corcel provides full CRUD operations on WordPress entities, site options management, navigation menu retrieval, and post metadata management. It exposes content querying with filtering by status, custom fields, taxonomies, and date order using an ORM query builder.