Pollora: WordPress Inside Laravel Explained | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://msaied.com) - [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [About](https://msaied.com#about)

           [  Contact](https://msaied.com#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://msaied.com)
- [ProjectsCase studies](https://msaied.com/projects)
- [ArticlesEngineering notes](https://msaied.com/articles)
- [CertificatesCredentials](https://msaied.com/certificates)
- [AboutHow I work](https://msaied.com#about)
- [ContactGet in touch](https://msaied.com#contact)

  [Start a conversation](https://msaied.com#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://msaied.com)
2. /
3. [Articles](https://msaied.com/articles)
4. /
5. [Laravel](https://msaied.com/articles?category=laravel)
6. /
7. Pollora: Run WordPress Inside a Laravel Application

   [Laravel](https://msaied.com/articles?category=laravel) [Open Source](https://msaied.com/articles?category=open-source) 

 Pollora: Run WordPress Inside a Laravel Application
====================================================

 Pollora is a framework that boots Laravel first and runs WordPress inside it, giving you Laravel routing, Blade views, Eloquent models, and PHP attribute-based post types alongside the full WordPress admin and plugin ecosystem.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://msaied.com#person) Published 29 Oct 2026 · Updated 1 Nov 2026 · 4 min read

ShareCopy linkCopied

 ![Pollora: Run WordPress Inside a Laravel Application](https://cdn.msaied.com/812/aa4ad01a8367beed63fe5ee9c09ef940.png) 

  On this page +1. [What Is Pollora?](#what-is-pollora)
2. [WordPress-Aware Routing](#wordpress-aware-routing)
3. [Post Types and Hooks as PHP Attributes](#post-types-and-hooks-as-php-attributes)
4. [Gutenberg Blocks with Blade](#gutenberg-blocks-with-blade)
5. [Eloquent Models and Media Storage](#eloquent-models-and-media-storage)
6. [How Pollora Compares to Acorn, Sage, and Corcel](#how-pollora-compares-to-acorn-sage-and-corcel)
7. [Getting Started](#getting-started)
8. [Key Takeaways](#key-takeaways)

 What Is Pollora?
----------------

Pollora is an MIT-licensed framework that embeds WordPress inside a Laravel application. Laravel boots first and owns the request lifecycle — routing, controllers, and Blade rendering — while WordPress continues to power the admin dashboard, database, and plugin ecosystem. Composer installs WordPress core into `public/cms`, and Pollora loads it during Laravel's boot process using your existing Laravel config and database connection.

Because both frameworks run together on every request, WordPress conditional tags like `is_single()` remain fully functional, and the admin dashboard at `/cms/wp-admin/` works exactly as it would on any standard WordPress site. WordPress core updates are managed through Composer rather than the dashboard.

WordPress-Aware Routing
-----------------------

Pollora extends Laravel's router with `Route::wp()` and `Route::wpMatch()`. These methods match incoming requests against WordPress conditional tags, letting you use either the full function name or a short alias:

```php
use App\Http\Controllers\FormController;
use App\Models\Feature;
use Illuminate\Support\Facades\Route;

Route::wp('single', function () {
    return view('post');
});

Route::wp('template', 'landing', function () {
    return view('page.landing', [
        'features' => Feature::all(),
    ]);
});

Route::wpMatch(['GET', 'POST'], 'page', ['contact', 'request-a-quote'], [FormController::class, 'index']);

```

When no route matches, Pollora falls back to the WordPress template hierarchy and renders the appropriate Blade view automatically — for example, `page-about.blade.php` before `page.blade.php`.

Post Types and Hooks as PHP Attributes
--------------------------------------

Instead of registering post types and hooks in `functions.php`, Pollora lets you declare them as PHP attributes on plain classes:

```php
#[PostType]
#[PubliclyQueryable]
#[HasArchive]
#[Supports(['title', 'editor', 'thumbnail'])]
#[MenuIcon('dashicons-calendar')]
class Event {}

```

Actions and filters follow the same pattern, and a single method can listen to multiple hooks simultaneously. Artisan generators like `pollora:make:post-type` and `pollora:make:action` scaffold these classes for you.

Gutenberg Blocks with Blade
---------------------------

The `pollora:make:block` command scaffolds a full Gutenberg block — `block.json`, JSX editor files, and a Blade template — in one step:

```bash
php artisan pollora:make:block hero-banner --theme

```

The Blade template renders the block on every request, so a markup change propagates to every page that uses the block. Assets are compiled with Vite.

Eloquent Models and Media Storage
---------------------------------

Pollora ships with Colt, a fork of Corcel, so you can query WordPress data through Eloquent models. For media, you can point the WordPress upload library at any Laravel filesystem disk — including S3 and Cloudflare R2 — by setting two environment variables:

```env
MEDIA_DISK=media
MEDIA_URL=https://media.example.com

```

Plugins like ACF and WooCommerce continue to use WordPress's own upload functions without modification.

How Pollora Compares to Acorn, Sage, and Corcel
-----------------------------------------------

| | Pollora | Acorn | Sage | Corcel | |---|---|---|---|---| | Boot order | Laravel first | WordPress first | WordPress first | Laravel only | | Post types | PHP attributes | Theme/plugin code | Theme code | N/A | | License | MIT, free | MIT, free | MIT, free | MIT, free |

Pollora's own comparison guide suggests Sage for a theme on a standard WordPress install, Acorn for adding Laravel components to an existing site, and Corcel when a Laravel app only needs to read WordPress data. Pollora itself is described as a young project compared to the more established Acorn and Sage ecosystems.

Getting Started
---------------

```bash
composer create-project pollora/pollora my-project

```

Full setup instructions, CLI reference, and DDEV configuration are available in the [installation guide](https://pollora.dev/getting-started/installation/). The [Nectar](https://github.com/Pollora/nectar) package adds Pollora guidelines and MCP tools for coding agents via Laravel Boost.

Key Takeaways
-------------

- Laravel boots first; WordPress runs inside it, not the other way around.
- `Route::wp()` matches requests on WordPress conditional tags with a Blade fallback.
- Post types, taxonomies, actions, and filters are declared as PHP attributes.
- Gutenberg blocks are scaffolded with Artisan and rendered with Blade and Vite.
- WordPress media can be stored on any Laravel disk, including S3 and R2.
- WordPress core is managed via Composer, not the dashboard.
- Pollora is MIT licensed and actively described as a young project.

---

*Source: [Pollora: Run WordPress Inside a Laravel Application — Laravel News](https://laravel-news.com/pollora-wordpress-laravel)*

- [Laravel](https://msaied.com/articles?search=Laravel)
- [WordPress](https://msaied.com/articles?search=WordPress)
- [Pollora](https://msaied.com/articles?search=Pollora)
- [PHP](https://msaied.com/articles?search=PHP)
- [Blade](https://msaied.com/articles?search=Blade)
- [Composer](https://msaied.com/articles?search=Composer)

 Frequently asked questions 
---------------------------

  Does Pollora require a separate WordPress installation?No. Composer installs WordPress core into the `public/cms` directory of your Laravel project. Pollora loads it during Laravel's boot process using your existing Laravel config and database connection, so no separate WordPress setup is needed.

   Can existing WordPress plugins like ACF and WooCommerce still be used with Pollora?Yes. WordPress still parses every request and its plugin system remains intact. Plugins like ACF and WooCommerce continue to use WordPress's own upload and hook functions without any modification required.

   How is Pollora different from Acorn or Sage?Pollora boots Laravel first and runs WordPress inside it, giving Laravel full control over routing and rendering. Acorn and Sage boot WordPress first and layer Laravel components on top. Pollora also uses PHP attributes for post types and hooks rather than theme or plugin code.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

[Mohamed Said](https://msaied.com#person)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

[About](https://msaied.com#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleFilament v5.8: Deferred Schema Loading, Table Grouping Improvements, and More](https://msaied.com/articles/filament-v58-deferred-schema-loading-table-grouping-improvements-and-more)  

   On this page
-------------

1. [What Is Pollora?](#what-is-pollora)
2. [WordPress-Aware Routing](#wordpress-aware-routing)
3. [Post Types and Hooks as PHP Attributes](#post-types-and-hooks-as-php-attributes)
4. [Gutenberg Blocks with Blade](#gutenberg-blocks-with-blade)
5. [Eloquent Models and Media Storage](#eloquent-models-and-media-storage)
6. [How Pollora Compares to Acorn, Sage, and Corcel](#how-pollora-compares-to-acorn-sage-and-corcel)
7. [Getting Started](#getting-started)
8. [Key Takeaways](#key-takeaways)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://msaied.com#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/808/d118ca0a73009ac41175d54bc274a4d5.png) Laravel · 4 min read### Filament v5.8: Deferred Schema Loading, Table Grouping Improvements, and More

26 Oct 2026 ](https://msaied.com/articles/filament-v58-deferred-schema-loading-table-grouping-improvements-and-more) [ ![](https://cdn.msaied.com/811/06569a963be3a67e056761798af93374.png) Filament · 4 min read### Filament v4.16.0 Released: Security Hardening, Lazy Loading APIs &amp; More

26 Oct 2026 ](https://msaied.com/articles/filament-v4160-released-security-hardening-lazy-loading-apis-more) [ ![](https://cdn.msaied.com/810/7a7621033d764cdc5887dae467e11aad.png) Laravel · 3 min read### Mastering Laravel Testing: A Video Course on Laravel Tests

26 Oct 2026 ](https://msaied.com/articles/mastering-laravel-testing-a-video-course-on-laravel-tests) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://msaied.com#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://msaied.com)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://msaied.com/sitemap.xml)
