Deployment
Prerequisites
Section titled “Prerequisites”- PHP 8.2 or higher
- Mysql or MariaDB
- Composer 2
- Node 20
Deployment Steps (RunCloud)
Section titled “Deployment Steps (RunCloud)”-
In RunCloud, create a Web Application for your site. Set the web root to
web. -
Under the web app, go to Git and connect your repository. Set the branch to deploy (e.g.
main). -
Create an
auth.jsonin the app root:auth.json {"http-basic": {"connect.advancedcustomfields.com": {"username": "b3JkZXJfaWQ9Njc3OTl8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE1LTEwLTMxIDEzOjE3OjA4","password": "https://localhost"}}}There is no need to change the values
-
Copy
.env.prod.exampleto.envand fill in variables. -
Add the
.htaccessfile to thewebfolder:web/.htaccess <IfModule mod_rewrite.c># BEGIN WordPressRewriteEngine OnRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]RewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]# END WordPress</IfModule> -
Under Deployment Script in RunCloud, replace the default script with:
Terminal window git checkout origin/{branch} --forcecomposer install --no-dev --prefer-dist --no-interaction --optimize-autoloadernpm cinpm run buildwp timber clear-cache# wp w3tc flush all # optional: only if W3 Total Cache is installed -
Enable Auto Deployment (webhook) in RunCloud’s Git tab. Add the generated webhook URL to your repository’s webhook settings (GitHub/GitLab → Settings → Webhooks).
-
Push to your deploy branch to trigger a deployment, or click Deploy manually in RunCloud.
-
Import your database file.
Deployment Steps (Manual SSH)
Section titled “Deployment Steps (Manual SSH)”-
Clone your site onto the server.
-
Create a file called
auth.jsonand paste the following content, this file is used for installing Advanced Custom Fields:auth.json {"http-basic": {"connect.advancedcustomfields.com": {"username": "b3JkZXJfaWQ9Njc3OTl8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE1LTEwLTMxIDEzOjE3OjA4","password": "https://localhost"}}}There is no need to change the values
-
Run
composer installin the root. -
Copy
.env.exampleto.envand fill in the missing variables. -
Add the
.htaccessfile to thewebfolder:web/.htaccess <IfModule mod_rewrite.c># BEGIN WordPressRewriteEngine OnRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]RewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]# END WordPress</IfModule> -
Run
npm installin the project root. -
Run
npm run buildin the project root. -
Import your database file.
Next: set up wp-manage
Section titled “Next: set up wp-manage”Once the site is deployed, set up wp-manage to sync content between remote and local environments.

