PHPainfree2 Docs

Quickstart - Documentation | PHPainfree2

Quickstart Guide

Start building something cool in just a few minutes.

1. Grab the Source Code

git clone --depth=1 https://github.com/Programming-is-Easy/PHPainfree.git \
&& cd PHPainfree && rm -rf .git && cp development.env .env

Grab the current source code from Github, delete the .git/ folder, and copy the development.env file into .env.

The .env file will contain sensitive passwords and other essential private items (API keys, etc) and should never be checked into version control. A minimalistic version is included with the PHPainfree source code to allow you to connect to the Docker database configured in the local development environment.

2. Turn on the Docker Server

docker compose up

PHPainfree V2 comes with a Docker setup for speedy development. By default, the docker-compose.yml configuration will start up three containers:

  • phpainfree_dev - Apache+PHP container running your application.
  • phpainfree_db - MySQL container with a persistent storage volume.
  • phpainfree_phpmyadmin - PHPMyAdmin web application connected to phpainfree_db.

3. Code!

It's really as easy as that! You should have a webserver running the source code in this folder located at http://localhost:8888/ and you should see a complete clone of this website.

From here you can use this website as a starting point for simple web development projects, or you can wipe out almost everything and start your new project from scratch. PHPainfree has never been an "opinionated" framework, and really just provides some lightweight routing automation and some tools for persistent database connections.