CodingTricks LogoCodingTricks
HomePostsTipsCopy/PasteLinksContact UsAbout Us
2024 - 2025 CodingTricks.co | All rights reserved
Privacy PolicyTerms of Service
Setup Laravel with FrankenPHP

Setup Laravel with FrankenPHP

Posted by

kamlesh paul

on

Dec 8, 2024

| 2 min read

Last updated on : Dec 8, 2024

ServerCopy Paste
144 views

#Table of Contents

  • Step 1: Clone the Repository
  • Step 2: Move the Cloned Repository :
  • Step 3: Make Download Script Executable
  • Step 4: Download Composer and FrankenPHP
  • Step 5: Install Composer dependency
  • Step 6: Run FrankenPHP Server
  • Step 7: Open Localhost
  • Step 8: gitignore
  • Useful command

#Step 1: Clone the Repository

  • Navigate to the root of your Laravel project and clone the repository:
git clone https://github.com/Kamleshpaul/setup-laravel-with-frankenphp.git

#Step 2: Move the Cloned Repository :

  • Move the cloned repository to root directory:
mv setup-laravel-with-frankenphp/{Caddyfile,download.sh} ./ && rm -rf setup-laravel-with-frankenphp

#Step 3: Make Download Script Executable

  • Make the download script executable:
chmod +x download.sh

#Step 4: Download Composer and FrankenPHP

  • Run the download script:
sh download.sh 

This script will download composer.phar for Composer and FrankenPHP for php-cli, php, and Caddy server.

#Step 5: Install Composer dependency

  • To install all the dependency, use the following command:
 ./frankenphp php-cli ./composer.phar install

#Step 6: Run FrankenPHP Server

  • To run the FrankenPHP server, use the following command:
./frankenphp run

#Step 7: Open Localhost

  • After running the server, open your web browser and navigate to https://localhost

#Step 8: gitignore

  • Add this in .gitignore
frankenphp
composer.phar

#Useful command

  • composer cmd
./frankenphp php-cli ./composer.phar (install | update | dump-autoload | require | remove)
  • Laravel artisan cmd
./frankenphp php-cli artisan about

NOTE: It installs PHP 8.3. If you need another version of PHP, you can compile and use FrankenPHP and change the Composer version.

Related Posts

  • How to Add Laravel Passkeys to Laravel 11 How to Add Laravel Passkeys to Laravel 11
  • Implementing Google reCAPTCHA v3 with Next.js Server ActionsImplementing Google reCAPTCHA v3 with Next.js Server Actions
  • How to Create Custom Error Page in Laravel 11?How to Create Custom Error Page in Laravel 11?
  • How to Send E-Mail Using NodeMailer and React Email in Next.jsHow to Send E-Mail Using NodeMailer and React Email in Next.js
  • How to Customize FrankenPHPHow to Customize FrankenPHP

Tags

Api(1)Authentication(5)Backup (1)Copy Paste(12)Email(2)Express(1)Firebase(1)Github Action(2)News(8)Push Notification(1)Queue(2)Server(11)Server Action(3)Testing(1)Tips(17)Websocket(1)

Popular Posts

  • TweakPHP 0.1.0 Beta: A Free and Open-Source Alternative to Tinkerwell Is Here!  TweakPHP 0.1.0 Beta: A Free and Open-Source Alternative to Tinkerwell Is Here!
  • How to use WebSocket in NextJS App router with Socket.IOHow to use WebSocket in NextJS App router with Socket.IO
  • How to Set Up Queue Jobs in NextJS Using BullMQHow to Set Up Queue Jobs in NextJS Using BullMQ
  • Boost Laravel Performance: Running Octane with FrankenPHP in Production ( Zero downtime)Boost Laravel Performance: Running Octane with FrankenPHP in Production ( Zero downtime)
  • How to Set Up NextJS cron jobs without VercelHow to Set Up NextJS cron jobs without Vercel
  • Mastering Laravel Streamed Responses: Boost Performance with Fast Data DeliveryMastering Laravel Streamed Responses: Boost Performance with Fast Data Delivery
  • Tinkerwell Alternative: Free and Open-Source PHP Debugging with TweakPHPTinkerwell Alternative: Free and Open-Source PHP Debugging with TweakPHP
  • Nextjs 14 roles and permissions (RBAC) : Step-by-Step GuideNextjs 14 roles and permissions (RBAC) : Step-by-Step Guide

Get updates directly to your inbox.

Join 500+ developers getting updates on Laravel & Next.js tips. No spam,
unsubscribe anytime.


Share this article:

144 views