Laravel vs Plain PHP: When to Use a Framework
Not every PHP project needs Laravel, and treating "use a framework" as a default without thinking about it leads to either wasted overhead on tiny projects or, worse, unmaintainable spaghetti on projects that actually needed the structure.
When plain PHP is the right call
- Small, single-purpose scripts — a contact form handler, a webhook receiver, a simple CSV export. Pulling in a full framework for a 50-line script is unnecessary weight.
- Extending an existing WordPress site. WordPress has its own structure (hooks, actions, filters); wrapping Laravel around WordPress work fights the platform instead of working with it.
- Extremely tight hosting constraints where every bit of overhead matters, and the project's scope is genuinely small enough to stay simple.
- Learning fundamentals. If you're teaching yourself backend development, understanding raw PHP — request handling, sessions, database queries with PDO — before jumping to a framework gives you a much stronger foundation for understanding what Laravel is actually doing for you underneath.
When Laravel is clearly worth it
- Any project with user authentication. Laravel's built-in auth scaffolding (including roles, permissions via packages like Spatie) saves real time and avoids the security mistakes common in hand-rolled auth systems.
- Anything with a real database layer. Eloquent ORM, migrations, and seeders make schema changes and data relationships far more maintainable than raw SQL scattered through the codebase.
- Multi-developer projects. Laravel's conventions mean a new developer joining the project can find their way around quickly, rather than learning one developer's personal, undocumented structure.
- Anything that will grow. A project that starts small but has a realistic chance of growing into user roles, notifications, background jobs, and API endpoints is much easier to extend within Laravel's structure than to retrofit onto a plain-PHP codebase after the fact.
- Projects needing queues, scheduled tasks, or background jobs — sending emails, processing uploads, running reports — Laravel's queue system handles this cleanly; building it from scratch in plain PHP is real, avoidable engineering effort.
The middle ground: lightweight frameworks
For projects that feel too big for plain PHP but genuinely don't need Laravel's full weight, Slim or Lumen (Laravel's lighter sibling, though now less actively maintained) can be a reasonable middle ground — though in practice, on 2026 hosting, Laravel's overhead is rarely the actual bottleneck, so this middle ground is less necessary than it used to be.
The real decision factor
Ask one question: will this project need auth, a real database with relationships, or grow in scope over the next year? If yes to any of those, Laravel pays for its setup cost quickly. If the honest answer is "no, this stays small and simple," plain PHP is the right, unpretentious choice.
Need a Laravel application built properly, or a plain-PHP script done without unnecessary overhead? I do both, deliberately.
Discuss your project