Install Payment Processor on a new domain: the in-browser wizard (recommended) or a manual setup.
public/ folder, then open
install.php. The wizard checks the server, creates the database, sets up your
admin account, writes .env, shows the cron command for your server, and deletes itself.
pay.example.com) at the server with an A/AAAA record.https:// address.| What | Needed |
|---|---|
| PHP | 8.2 or newer (web and CLI) |
| MySQL / MariaDB | 8.0+ / 10.6+ |
| Web server | Apache with mod_rewrite (rules are shipped in .htaccess), or Nginx |
| PHP extensions (required) | pdo_mysql, openssl, curl, json, mbstring |
| PHP extensions (recommended) | gd (login captcha), zip (in-app upgrades), fileinfo (upload checks) |
| PHP functions | putenv() and getenv() must be enabled. aaPanel and some hosts list
putenv under disabled functions — remove it there, or every page fails after install. |
| Cron | A job that runs every minute |
Upload payment-processor-vX.Y.Z.zip to the site folder and extract it so that
public/, app/, core/ … sit directly inside the site folder.
cd /var/www/pay.example.com # aaPanel: /www/wwwroot/pay.example.com
unzip payment-processor-vX.Y.Z.zip
mv payment-processor-vX.Y.Z/* payment-processor-vX.Y.Z/.[!.]* . && rmdir payment-processor-vX.Y.Z
The zip contains hidden files (.htaccess, .env.example); make sure your file manager
copies them too.
public//public.
For Nginx, set URL rewrite to
location / { try_files $uri $uri/ /index.php?$query_string; }.…/pay.example.com/public.If you can't change the document root, the project root also works on Apache: the shipped root
.htaccess routes requests into public/ and blocks the private folders.
chown -R www:www /www/wwwroot/pay.example.com # aaPanel (user "www")
# chown -R www-data:www-data /var/www/pay.example.com # Debian/Ubuntu
# cPanel: files are already owned by your account user
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
The wizard writes .env and storage/.installed; later the app writes logs, caches,
uploads and upgrade snapshots.
Open https://pay.example.com/ — a fresh install redirects to install.php.
https://pay.example.com, no trailing slash. This becomes
APP_URL and is used in every gateway callback and return URL.Click Activate license on the Done page (or open /install/license) and paste the key.
It is bound to the domain shown on that page.
Copy the line from the Done page into aaPanel Cron → Shell Script (every minute), cPanel
Cron Jobs, or crontab -e:
* * * * * /usr/bin/php /var/www/pay.example.com/cron/check_pending.php >/dev/null 2>&1
Use a PHP 8.2+ CLI binary (aaPanel: /www/server/php/82/bin/php; cPanel:
/opt/cpanel/ea-php82/root/usr/bin/php). Running it as root is fine — it switches to the owner of
storage/.
Go to https://pay.example.com/admin/login with the account you created, then continue with
After install.
For scripted deploys, or when the wizard can't run. Do section 1 and the upload and ownership steps above first.
mysql -u root -p <<'SQL'
CREATE DATABASE payment_processor CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'pp_user'@'localhost' IDENTIFIED BY 'a-strong-password';
GRANT ALL PRIVILEGES ON payment_processor.* TO 'pp_user'@'localhost';
FLUSH PRIVILEGES;
SQL
mysql -u pp_user -p payment_processor < database/schema.sql
.envcp .env.example .env
# Edit .env:
# APP_URL=https://pay.example.com (public URL, no trailing slash)
# APP_DEBUG=false (keep off in production)
# APP_MODE=production
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_NAME=payment_processor
# DB_USER=pp_user
# DB_PASS=a-strong-password
# DB_SOCKET= (optional; overrides host/port)
# MAIL_* (SMTP for payment-link emails)
chmod 640 .env
php bin/migrate.php
php bin/migrate.php --status # should end with "(none) — database is up to date"
schema.sql is already the latest shape; this records the shipped migrations as applied so
System Updates starts clean. It is safe to re-run.
Enable mod_rewrite and AllowOverride All, and point DocumentRoot at
public/. The .htaccess files are shipped.
server {
listen 443 ssl http2;
server_name pay.example.com;
root /var/www/pay.example.com/public;
index index.php;
# ssl_certificate / ssl_certificate_key ...
location ~ /\.(env|git|htaccess) { deny all; return 404; }
location ~ ^/(config|core|app|gateways|database|storage|sdk|cron|vendor)/ {
deny all; return 404;
}
location / { try_files $uri $uri/ /index.php?$query_string; }
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
client_max_body_size 32M;
}
Behind Cloudflare or another proxy, pass X-Forwarded-Proto so the app knows the request was
HTTPS.
Open https://pay.example.com/ once in a browser. With .env in place and admin users
in the database, that first request writes storage/.installed (the installed-version marker). Then:
cat storage/.installed # confirm it exists
rm public/install.php
* * * * * /usr/bin/php /var/www/pay.example.com/cron/check_pending.php >/dev/null 2>&1
Test it once by hand: php cron/check_pending.php. A run appears under
Cron Logs in the admin.
In a browser: https://pay.example.com/install/license. Or from the shell (uses the host in
APP_URL):
php bin/license.php activate XXXXX-XXXXX-XXXXX-XXXXX
php bin/license.php status
A manual install keeps the seed superadmin:
Email: [email protected]
Password: Change@First123
/admin/login, create your own superadmin under Admin Users, log in as
it, and delete the seed account. At minimum change its password straight away.
System Updates → Server configuration checks should be all green (cron running, log folder writable, CLI PHP found).
All gateways ship installed and inactive. For each one you use: Payment Gateways → Edit, choose Test or Live mode, enter the credentials, save, then tick Active.
On the gateway's own dashboard, register the webhook / callback URL where the gateway needs one:
https://pay.example.com/callback/{slug} e.g. /callback/paypal, /callback/cashfree
/return/{slug}/{txn}) are sent with each payment — don't register them by hand.The Edit page of each gateway shows its exact URLs and setup notes.
Merchants → Add: name, code, return URL, callback (webhook) URL, and the gateways it may use.
Then Integrations → the merchant → Download SDK bundle. The bundle holds the SDK, the
integration guide, an example and a config.php with the credentials and this domain as the
endpoint.
.env: MAIL_* for emails. TURNSTILE_SITE_KEY /
TURNSTILE_SECRET_KEY still work; keys saved in Login Security take priority.example.php or a
payment link).success with a webhook logged.Dump the database and copy the whole install folder, including .env, uploads/,
public/uploads/ and storage/.
mysqldump -u pp_user -p --single-transaction payment_processor > pp-backup.sql
tar czf pp-files.tgz -C /var/www pay.example.com
php bin/license.php deactivate # run on the old install
If the old server is gone, ask your vendor to release the seat.
Do section 1, restore the files and the database, then:
# .env
APP_URL=https://pay.new-domain.com
DB_...= # new database credentials, if they changed
rm -f config/license.php # bound to the old domain
rm -f public/install.php # never run the wizard over a restored database
php bin/migrate.php --status # should show nothing pending
Then fix ownership, point the document root at public/, and add the cron job (paths may differ
on the new server).
Open https://pay.new-domain.com/install/license, or run
php bin/license.php activate <key>.
On every gateway dashboard, replace the old domain in webhook / callback URLs with
https://pay.new-domain.com/callback/{slug}, and update Cashfree's domain whitelist. Nothing to change
inside the admin: return URLs follow APP_URL.
Each merchant changes setEndpoint('https://pay.new-domain.com') (or re-downloads the SDK bundle
from Integrations). API keys and secrets don't change. The SDK doesn't follow redirects, so an
old endpoint fails until it is updated.
Redirect the old domain to the new one with a 308 (keeps POST bodies) for at least a day, so customers and gateway callbacks for payments started before the move still arrive.
# Nginx, old domain
return 308 https://pay.new-domain.com$request_uri;
Also update the Turnstile widget hostname and the mail sender domain if you use them.
| Symptom | Fix |
|---|---|
| "Internal Server Error" or blank page on every URL right after install | putenv is disabled — remove it from PHP's disabled functions and reload PHP. |
| 404 on everything except the home page | Apache: enable mod_rewrite and AllowOverride All. Nginx: add the
try_files … /index.php?$query_string rule. |
| Admin pages have no styling | The document root isn't public/ and the root .htaccess wasn't uploaded
(hidden file). |
Every page redirects to /install/license |
The license isn't activated for this domain yet. |
Gateway callbacks never arrive / URLs show http:// |
APP_URL in .env must be the public https:// address. |
| Logo upload fails | Give the web user write access to public/uploads/ (or uploads/ when the project
root is the document root). |
Payments stay pending forever |
The cron isn't running — check Cron Logs and the cron's PHP path. |
| Wizard says the database already contains an install | Use an empty database, or log in and upgrade via System Updates instead. |
| Path | What it holds | Preserved by upgrade? |
|---|---|---|
.env | Environment + DB credentials | Yes |
config/license.php | License activation (bound to one domain) | Yes |
storage/logs/ | Daily app + cron logs | Yes |
storage/backups/ | Pre-upgrade snapshots | Yes |
storage/.installed | Installed-version marker | Yes |
uploads/, public/uploads/ | Merchant logos, gateway icons, branding | Yes |
| Everything else | Source code, templates, migrations | Overwritten on upgrade |
SETUP.md and UPGRADE.md at the project root.CHANGELOG.md at the project root.