Supercharge Laravel with Octane + FrankenPHP
Want to make your Laravel application faster and more efficient? Meet Laravel Octane and FrankenPHP - a powerful combination that can drastically improve your app's performance. In this guide, we’ll walk through how to set up Laravel Octane with FrankenPHP, the modern PHP app server written in Go.
What is Laravel Octane?
Laravel Octane supercharges your application by:
- Running on high-powered servers
- Keeping your app in memory between requests
- Reducing response times significantly
Installing Laravel Octane
Start by installing Octane using Composer:
composer require laravel/octane
Then publish the Octane configuration file:
php artisan octane:install
This creates the config/octane.php file where you can adjust settings like the server type and port.
What is FrankenPHP?
FrankenPHP is a modern PHP application server built in Go.
It offers:
- Built-in support for persistent workers
- Automatic HTTPS
- HTTP/2 and HTTP/3 support
- Great performance with Laravel apps
FrankenPHP can run your Laravel app faster and more efficiently, especially when combined with Octane.
Serving Your Laravel App
To serve your application using Octane:
php artisan octane:start
By default, this will start your app at:
http://localhost:8000
You can change the port by passing the --port option:
php artisan octane:start --port=9000
Using Laravel with FrankenPHP
FrankenPHP runs PHP apps natively, so you can simply:
- Install FrankenPHP from frankenphp.dev.
- Point FrankenPHP to Laravel’s
public/index.php. - Your Laravel app will run with worker support and improved performance.
This setup gives you the benefits of Octane without needing extra server tools.
Final Thoughts
Combining Laravel Octane with FrankenPHP gives you:
- Faster boot time
- Persistent application memory
- A modern PHP server experience
It’s a great choice if you want to modernize your Laravel deployment with minimal setup.
Useful Links
Have something in mind?
↗A role, an idea, or a conversation. I’d love to hear what you’re thinking.
Start a conversation ↗