Installing InspireCMS

This guide provides detailed instructions for installing InspireCMS in various environments.

Prerequisites

Before beginning installation, ensure your environment meets the system requirements.

Standard Installation

Step 1: Create a Laravel Application

You can install InspireCMS on a new Laravel application or an existing one:

# Create a new Laravel application
composer create-project laravel/laravel my-inspirecms-project
cd my-inspirecms-project

Step 2: Configure Your Database

Update your .env file with your database credentials:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_database_user
DB_PASSWORD=your_database_password

Step 3: Install InspireCMS

Add InspireCMS to your project:

composer require solution-forest/inspirecms-core

Step 4: Run the Installer

The installer will set up the database, publish assets, and configure InspireCMS:

php artisan inspirecms:install

To skip sample data, use the --skip-samples flag:

php artisan inspirecms:install --skip-samples

Step 5: Access the Admin Panel

After installation, you can access the admin panel at /cms (or your configured prefix). Use the credentials you provided during installation or the default admin user:

  • Username: admin@example.com
  • Password: password

Manual Installation Steps

If you need more control over the installation process, follow these steps:

  1. Install required packages:
php artisan inspirecms:install-require-packages
  1. Publish configuration, migrations, and assets:
php artisan vendor:publish --tag="inspirecms-config"
php artisan vendor:publish --tag="inspirecms-migrations"
  1. Run migrations:
php artisan migrate
  1. Publish panel:
php artisan inspirecms:publish-panel
  1. Import default data:
php artisan inspirecms:import-default-data
  1. Repair permissions:
php artisan inspirecms:repair-permissions

Docker Installation

InspireCMS can be installed in a Docker environment using Laravel Sail:

  1. Install Laravel with Sail:
curl -s "https://laravel.build/my-inspirecms-project" | bash
cd my-inspirecms-project
  1. Start Docker containers:
./vendor/bin/sail up -d
  1. Install InspireCMS using Sail:
./vendor/bin/sail composer require solution-forest/inspirecms-core
./vendor/bin/sail artisan inspirecms:install

Troubleshooting Common Issues

Permissions Issues

If you encounter permission issues, ensure your web server has appropriate access:

# For Ubuntu/Debian
chmod -R 775 storage bootstrap/cache
chown -R $USER:www-data storage bootstrap/cache

Database Connection Issues

If you're having trouble connecting to your database, verify your .env configuration and ensure the database exists.

Package Discovery Problems

If Laravel isn't discovering the package, try clearing your cache:

php artisan config:clear
php artisan cache:clear

Next Steps

After installing InspireCMS, you might want to: