Installation
Create a new FloCMS project with Composer, check that your server is ready, and set up the database and your first admin account.
Requirements
- PHP 8.1 or newer, with the
pdo,mbstring,fileinfoandgdextensions - Composer 2
- MySQL or MariaDB, only if your site uses a database. The welcome page works without one.
- A web server that points to the
public/folder: Apache with.htaccess, or Nginx
Create a project
Run create-project with the name of the folder you want:
composer create-project hostkurd/flocms my-site
cd my-site
Composer installs the framework packages, copies .env.example to .env, creates the storage folders and generates a fresh APP_KEY for you.
Note
All five FloCMS packages, core, API, CLI, uploader and CAPTCHA, use exact version requirements, and composer.lock records the installed versions. Deploy with composer install to preserve them. See framework and packages and the upgrade guide.
Start a local server
Use the built-in server while you develop, then open the address it prints:
php flo serve
If APP_URL in .env doesn't match the address you opened, the welcome page tells you, and on a local install it offers a button that writes the right URL to .env.
Check your installation
php flo doctor checks PHP and its extensions, that storage/ and views/cache/ are writable, your .env file, APP_KEY, APP_URL, the database and pending migrations. It exits with 1 when a check fails, so you can use it in scripts:
php flo doctor
Database and first admin
Create a database (in phpMyAdmin, for example), then add its details to .env:
DB_HOST=127.0.0.1
DB_PORT=3306
DB_NAME=my_site
DB_USERNAME=root
DB_PASSWORD=
Run the migrations, which create the users table and the API tables, then create the first admin account:
php flo migrate
php flo user:create --role=super-admin
user:create asks for the name, email and password. The password is hidden and asked twice. Log in at /admin/users/login.
Next steps
- Configuration: the
.envfile andconfig/config.php - Routing: how URLs reach your controllers
- Generate your first page with
php flo make:route Blog, which creates a controller, a model and a view