ProcessWire Installation and Setup
ProcessWire is installed manually — there's no package manager like apt or brew. Minimum requirements: PHP 7.4+ (8.1+ recommended), MySQL 5.7+ or MariaDB 10.3+, Apache/Nginx with .htaccess support or equivalent URL rewriting.
Installation Process
# Download latest release
curl -L https://github.com/processwire/processwire/archive/refs/heads/master.zip -o pw.zip
unzip pw.zip -d /var/www/mysite
cd /var/www/mysite
# Set permissions
chmod 755 site/assets/files site/assets/cache site/assets/logs site/assets/sessions
Web installer launches at http://yourdomain.com/install.php. It checks for PHP extensions (pdo_mysql, gd, mbstring, openssl), creates database tables, and generates /site/config.php.
After installation completes, install.php is deleted automatically — if not, delete manually.
config.php Configuration
Key parameters after installation:
// /site/config.php
$config->dbHost = 'localhost';
$config->dbName = 'mysite_db';
$config->dbUser = 'mysite_user';
$config->dbPass = 'secret';
$config->dbPort = '3306';
// Debug — only on dev environment
$config->debug = false;
// Site URL (important when behind reverse proxy)
$config->httpHosts = ['mysite.com', 'www.mysite.com'];
// File types
$config->fileContentTypes = array_merge(
$config->fileContentTypes,
['svg' => 'image/svg+xml']
);
// Sessions
$config->sessionExpireSeconds = 86400;
Nginx Configuration
Apache config is generated automatically via .htaccess. For Nginx:
server {
listen 80;
server_name mysite.com;
root /var/www/mysite;
index index.php;
location / {
try_files $uri $uri/ /index.php?it=$uri&$args;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Protect admin directories
location ~ ^/site/(assets|modules|templates)/ {
deny all;
}
}
Initial Setup After Installation
Installation Profile. ProcessWire offers three profiles: blank (clean), default (demo content), languages (with language support). For production — blank or languages.
site/ Directory Structure:
site/
assets/ # uploaded files, cache (not in git)
modules/ # custom and third-party modules
templates/ # PHP templates
config.php
config-dev.php # dev overrides (git-ignored)
config-dev.php lets you keep dev settings separate:
// config-dev.php — loaded automatically if exists
$config->debug = true;
$config->dbHost = '127.0.0.1';
$config->dbName = 'mysite_dev';
Module Installation
// Via admin: Modules → Install → search by name
// Or manually: copy module folder to /site/modules/
// then: Modules → Refresh → Install
Essential modules for most projects: MarkupPagerNav (pagination), InputfieldTinyMCE (WYSIWYG), LanguageSupport (if needed).







