Documentation
Everything you need to go from a blank VPS to a live WordPress site.
Requirements
Before installing pressctl, make sure you have:
- Linux or macOS on your local machine
- Ansible 2.14+ installed (
pip install ansibleorbrew install ansible) - A fresh Ubuntu 24.04 server with root SSH access — DigitalOcean, Hetzner, AWS, Linode, or any VPS provider
Installation
Install pressctl with a single command:
curl -fsSL https://raw.githubusercontent.com/shariffff/pressctl/main/install.sh | bashWhat this does:
- Downloads the
pressbinary from the pressctl GitHub repository - Copies the Ansible playbooks to
~/.pressctl/ansible/ - Makes the
presscommand available in your terminal
No repository cloning, no manual build steps. One command and you're ready.
Provision a Server
press server provisionThis is the main command that sets up everything your server needs to host WordPress. You can also just run press and choose option 1 from the quick actions menu.
pressctl will ask you a few questions:
- Server name — a label for your reference (e.g.
production) - IP address — your server's public IP
- SSH user — defaults to
root(press Enter to accept) - SSH port — defaults to
22 - SSH private key — defaults to
~/.ssh/id_rsa
Pre-flight checks:
- SSH connectivity — verifies pressctl can reach your server
- Port conflicts — checks that ports 80, 443, and 3306 are free. If Apache, Caddy, or MySQL are already installed, pressctl warns you before proceeding
What gets installed:
- Nginx from the official repository
- PHP 8.3 with optimized FPM pools
- MariaDB with secure defaults
- Redis for object caching
- Let's Encrypt via Certbot
- UFW firewall (ports 22, 80, 443 only)
- Fail2ban for brute-force protection
- SSH hardening
Provisioning takes about 5–10 minutes. When complete, you'll see a success message with the generated MySQL password (also saved in your config file).
Important: At this stage, pressctl only prepares the server. No WordPress site exists yet — site-specific features like isolated Linux users and per-site PHP-FPM pools happen when you create a site.
List Servers
press server listShows all servers in your pressctl inventory with their status, IP, and site count.
press server list --jsonUse --json for machine-readable output, useful for scripts and automation.
Server Health Check
press server health-checkTests SSH connectivity to a server. Select from the list or pass the name directly: press server health-check myserver.
Create a WordPress Site
press site createCreates a new WordPress site on a provisioned server. pressctl will prompt you for:
- Target server — choose which provisioned server to use
- Primary domain — e.g.
yoursite.com - WordPress admin username
- WordPress admin email
- Password — let pressctl generate a secure one, or set your own
What happens for each site:
- A dedicated Linux user is created for the site
- A separate PHP-FPM pool runs under that user
- An isolated database is created with its own credentials
- File permissions are locked down — sites can't read each other's files
- Nginx is configured with the site's domain
- WordPress is installed via WP-CLI
- A cron job is set up for
wp-cron
Make sure to save the admin credentials shown after site creation. They're stored in your local config file at ~/.pressctl/pressctl.yaml.List Sites
press site listDisplays all sites across all servers with their domains and status.
Delete a Site
press site deleteRemoves a WordPress site and all its associated resources (database, Linux user, Nginx config, files, PHP-FPM pool). You'll be asked to confirm before anything is deleted.
Add a Domain
press domain addAttaches a domain to an existing WordPress site. pressctl will prompt for the server, the site, and the new domain name.
Make sure the domain's DNS A record points to your server's IP address before adding it. If DNS isn't configured, SSL certificate issuance will fail in the next step.
Enable SSL
press domain sslIssues a free SSL certificate for your domain using Let's Encrypt, making your site accessible over HTTPS. The certificate auto-renews via Certbot's systemd timer.
Configuration
press config showDisplays your current pressctl configuration — servers, sites, domains, and global settings. Read-only, safe to run anytime.
press config validateChecks your configuration for errors and missing required values.
press config editOpens the config file in your default editor. The config lives at ~/.pressctl/pressctl.yaml.
Technology Stack
Every provisioned server runs this exact stack:
| Component | Details |
|---|---|
| OS | Ubuntu 24.04 LTS |
| Web Server | Nginx (official repo) |
| PHP | 8.3 (ondrej/php PPA) |
| Database | MariaDB |
| Cache | Redis |
| SSL | Let's Encrypt (Certbot) |
| Firewall | UFW (ports 22, 80, 443) |
| Security | Fail2ban + SSH hardening |
All Commands
Quick reference for every press command:
| Command | Description |
|---|---|
press | Quick actions menu |
press server provision | Add and provision a new server |
press server list | List all servers |
press server health-check | Test server connectivity |
press server update | Update server configuration |
press server remove | Remove from inventory |
press site create | Create a WordPress site |
press site list | List all sites |
press site delete | Delete a site |
press domain add | Add domain to a site |
press domain remove | Remove a domain |
press domain ssl | Issue SSL certificate |
press config show | Show current configuration |
press config validate | Validate configuration |
press config edit | Edit config in your editor |
press version | Show version info |
Need help? Open an issue on GitHub.