Installation Guide
Get Scriptlog up and running in minutes with this comprehensive installation guide.
install/ directory.
System Requirements
Make sure your server meets these requirements before installation:
PHP
7.4 - 8.5
pdo pdo_mysql json mbstring curl gd fileinfo openssl
Database
MySQL 5.7+ / MariaDB 10.3+
utf8mb4 InnoDB
Web Server
Apache 2.4+ / Nginx
mod_rewrite SSL
Composer
Latest stable version
Dependencies Autoloading
Tip: Most modern hosting providers meet these requirements. For local development, use XAMPP, MAMP, or Laragon.
Installation Steps
Get the Source Code
Clone the repository with Git (for developers), or download the ZIP archive from the latest release (recommended for common users without Git or technical setup).
# Option A: Clone with Git (developers)
git clone https://github.com/cakmoel/Scriptlog.git
cd Scriptlog
# Option B: Download the latest release ZIP (recommended for production)
# Download scriptlog-vx.x.x.zip from:
# https://github.com/cakmoel/Scriptlog/releases/latest
# then extract it:
unzip scriptlog-vx.x.x.zip
cd scriptlog-vx.x.x
Option B is a production-ready runtime package without third-party development packages — no Git or Composer setup required. If you used Option B, skip Step 2.
Install Dependencies
Run Composer to install all required dependencies.
composer install
Composer's platform.php config locks dependency resolution to PHP 7.4, ensuring all packages stay compatible across PHP 7.4 through 8.5.
Set Folder Permissions
The installer verifies that these directories are writable by the web server user.
chmod -R 775 public/cache public/log public/files public/themes admin/plugins
Adjust ownership if needed — the web server user (e.g. www-data) must be able to write to these directories.
Create Database
Create a new empty database using utf8mb4_general_ci collation.
mysql -u root -p
CREATE DATABASE scriptlog CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'youruser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON scriptlog.* TO 'youruser'@'localhost';
FLUSH PRIVILEGES;
Run the Installer
Navigate to /install/ in your web browser and follow the wizard.
http://your-domain/install/
The wizard proceeds through three steps:
# Step 1: System Requirements Check
http://your-domain/install/index.php
# Step 2: Database Setup (creates 23 tables)
http://your-domain/install/setup-db.php
# Step 3: Complete Setup
http://your-domain/install/finish.php
The wizard checks requirements, creates tables, generates configuration files, and sets up the admin account.
Cleanup (Critical)
For security purposes, delete the install/ directory immediately after installation is complete.
rm -rf install/
After cleanup, restrict access to the generated configuration files:
chmod 640 config.php .env
Post-Installation
After installation, the application is available at the following URLs:
| Environment | URL |
|---|---|
| Public Site | http://your-domain/ |
| Admin Panel | http://your-domain/admin/ |
| API Endpoint | http://your-domain/api/v1/ |
Configuration Files
After installation, the following configuration files are generated:
| File | Purpose |
|---|---|
config.php |
Main configuration with $_ENV fallbacks |
.env |
Environment variables (auto-generated) |
../storage/keys/[random_filename].php |
Defuse encryption key for authentication cookies (kept outside the web root) |
Alternative: Install via Composer
You can also install Scriptlog as a Composer package:
# Create project directory
mkdir my-scriptlog
cd my-scriptlog
# Initialize composer
composer init --name="my/scriptlog" --type=project --no-interaction
# Require the package
composer require cakmoel/scriptlog:dev-develop --prefer-stable
# Or use minimum-stability dev in composer.json
# "minimum-stability": "dev",
# "prefer-stable": true
# Then: composer require cakmoel/scriptlog
The package will be installed in the vendor/ directory. The front controller is index.php at the project root.
Running the Application
php -S localhost:8080
Then access the application at http://localhost:8080. The front controller is index.php at the project root, so run the built-in server from the project root (no -t flag needed).
Directory Structure
After cloning the repository or extracting the ZIP archive, you'll see the following structure:
scriptlog/
├── index.php # Public front controller
├── config.php # Application configuration (generated by installer)
├── .env # Environment variables (generated by installer)
├── .htaccess # Apache rewrite and security rules
├── robots.txt # Search engine directives
├── rss.php # RSS feed
├── atom.php # Atom feed
├── sitemap.php # XML sitemap
├── readme.html # In-app readme (installation reference)
├── assets/ # Repository assets (mascot, graphics)
├── admin/ # Administration panel (admin/index.php)
│ ├── dashboard.php # Dashboard
│ ├── posts.php # Post management
│ ├── pages.php # Page management
│ ├── users.php # User management
│ ├── option-*.php # Settings pages
│ ├── plugins/ # Installed plugins
│ ├── assets/ # Admin assets
│ └── ...
├── api/ # REST API entry point (/api/v1/)
│ └── index.php
├── install/ # Installer wizard (DELETE after installation)
│ └── include/ # Installer helpers
├── lib/ # Core library
│ ├── main.php # Application bootstrap loader
│ ├── common.php # Constants and shared functions
│ ├── controller/ # Request controllers (20 files)
│ ├── core/ # Core classes (Bootstrap, Dispatcher, ...) (102 files)
│ ├── dao/ # Data Access Objects (19 files)
│ ├── dto/ # Data transfer objects
│ ├── handler/ # Request and action handlers (13 files + admin commands)
│ ├── model/ # Data models (9 files)
│ ├── service/ # Business logic layer (24 files)
│ ├── utility/ # Helper functions (224 files)
│ ├── validator/ # Input validation (5 files)
│ └── vendor/ # Composer dependencies
├── public/ # Public assets and generated files
│ ├── themes/ # Theme templates (blog = default theme)
│ ├── files/ # User uploads
│ ├── cache/ # Runtime cache
│ └── log/ # Log files
├── docs/ # Developer and user documentation
│ ├── dev-docs/ # Developer guides and API reference
│ └── user-docs/ # End-user documentation
├── tests/ # PHPUnit test suite
├── e2e/ # End-to-end tests
└── composer.json # Dependencies and scripts
Troubleshooting
Verify your database credentials in config.php:
- Check database host (usually
localhostor127.0.0.1) - Verify username and password
- Ensure database exists and user has proper permissions
Enable mod_rewrite for Apache:
sudo a2enmod rewrite
sudo systemctl restart apache2
For Nginx, ensure the following location block exists:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
Set proper ownership for web server:
sudo chown -R www-data:www-data /var/www/scriptlog
sudo chmod -R 755 /var/www/scriptlog
sudo chmod -R 755 /var/www/scriptlog/public/cache /var/www/scriptlog/public/log