Skip to main content

Requirements

Before installing LaraCMS, ensure your server meets these requirements:
  • PHP 8.4 or higher
  • Composer - Dependency management for PHP
  • Node.js & NPM - For frontend asset compilation
  • Database - SQLite, MySQL, PostgreSQL, or SQL Server
For local development, we recommend using Laravel Sail for a Docker-based environment, or Laravel Valet for macOS users.

Installation steps

1

Clone the repository

First, clone the LaraCMS repository from GitHub:
git clone https://github.com/Vilkrin/LaraCMS.git
cd LaraCMS
If you’re contributing to the project, create a new branch instead of working directly on main:
git checkout -b feat/your-feature
# or
git checkout -b fix/your-fix
2

Install dependencies

Install both PHP and JavaScript dependencies:
composer install
npm install
This will install all required packages including:
  • Laravel framework and core packages
  • Livewire and Flux UI components
  • Spatie packages for permissions and media
  • Development tools and testing frameworks
3

Configure environment

Copy the example environment file and generate your application key:
cp .env.example .env
php artisan key:generate
The .env file contains all your application configuration. See the Configuration guide for detailed settings.
4

Set up the database

LaraCMS supports multiple database systems. Choose the one that fits your needs:
SQLite is the default database for quick setup:
touch database/database.sqlite
Your .env file should have:
.env
DB_CONNECTION=sqlite
SQLite is perfect for development and small deployments. No additional database server required!
5

Run migrations

Create the database tables and structure:
php artisan migrate
This creates all necessary tables for:
  • User authentication and profiles
  • Roles and permissions
  • Blog posts, categories, and tags
  • Gallery albums and photos
  • Media library
6

Link storage

Create a symbolic link for public file access:
php artisan storage:link
This allows uploaded media files to be accessible from the web.
7

Start the development server

You can now start the application using the built-in development command:
composer run dev
This single command starts:
  • PHP development server on http://localhost:8000
  • Queue worker for background jobs
  • Vite dev server for hot module replacement
The composer run dev command uses concurrently to run all three services in one terminal window. You’ll see color-coded output for each service.
Alternatively, run services separately:
composer run dev

Verify installation

Once the development server is running, visit http://localhost:8000 in your browser. You should see the LaraCMS homepage.
Installation successful! You can now proceed to First steps to create your admin account and configure your site.

Production deployment

For production environments, follow these additional steps:
1

Optimize configuration

php artisan config:cache
php artisan route:cache
php artisan view:cache
2

Build assets

npm run build
3

Set up queue worker

Configure a process manager like Supervisor to keep the queue worker running:
php artisan queue:work --tries=3
4

Configure web server

Point your web server (Nginx, Apache) to the public directory and ensure proper permissions:
chmod -R 755 storage bootstrap/cache
Remember to set APP_ENV=production and APP_DEBUG=false in your production .env file for security and performance.

Troubleshooting

If you encounter permission errors, ensure the web server has write access to storage directories:
chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
  • Verify your database credentials in .env
  • Ensure the database server is running
  • For SQLite, check that the database file exists and is writable
If you encounter dependency conflicts:
composer install --ignore-platform-reqs
Or update to the latest compatible versions:
composer update
Clear npm cache and reinstall:
npm cache clean --force
rm -rf node_modules package-lock.json
npm install

Next steps

Configuration

Configure environment variables and application settings

First steps

Create your admin account and start using LaraCMS

Build docs developers (and LLMs) love