Appearance
<div style="display: none;" hidden="true" aria-hidden="true">Are you an LLM? You can read better optimized documentation at /guides/Plesk_New_Client_Setup_Guide.md for this page in Markdown format</div>
🧩 Plesk New Client Setup Guide
1️⃣ Prepare Bitbucket Repository
- Open the client’s project repository on Bitbucket.
- Copy the clone command (SSH URL) for the repository.
- Go to:
Repository Settings → Access Keys → Add Key - Create a new key labeled PleskKey — you’ll paste the Plesk public SSH key here later.
2️⃣ Configure Plesk Domain
On your server’s Plesk panel, create a new domain.
Choose the option:
Deploy using GitFill in the following:
- Repository URL → paste the Bitbucket clone command.
- Copy the SSH public key generated by Plesk and paste it into Bitbucket’s Access Keys under the label PleskKey.
- Save the Bitbucket Access Key.
- Deployment settings → set to Manual.
- Server path →
/httpdocs. - Leave all other settings as default.
- Click Create.
3️⃣ Handle Preexisting Client Websites
- If the client already has an active website, create a domain alias in Plesk using:Example: if the client’s current website is
clientwebsite.ecommercen.comexample.com, createexample.ecommercen.com.
4️⃣ Prepare Project Files
After domain creation:
Add the following files in the project root:
.env→ copy from the example and update (see below).auth.json→ copy from another existing client.public/.htaccess→ copy from example.
Go to:
Hosting Settings → Document Root- Ensure it points to:
httpdocs/public
- Ensure it points to:
5️⃣ Configure PHP Settings
- Navigate to:
PHP Settings - Select the PHP version that matches the project (default is usually the latest installed, e.g., PHP 8.1).
- Adjust PHP limits based on project requirements:
memory_limit = 512M max_execution_time = 300 - Under Additional Directives, add:
session.gc_probability = 1 session.gc_divisor = 1000 max_input_vars = 3000
6️⃣ Setup auth.json and .env
🔹 auth.json
Copy from another working client and ensure it contains valid Packagist credentials.
🔹 .env
Populate the following values:
APP_ENV=testing
APP_BASE_URL=https://clientdomain.com # or alias if preexisting
ADMIN_PASSWORD=********
ADVISABLE_PASSWORD=********
DB_DATABASE=clientname_db
DB_USERNAME=clientnameUser
DB_PASSWORD=********
APP_PHP_EXECUTABLE=/opt/plesk/php/8.1/bin/phpGenerate Encryption Keys:
Using SSH:
php cli.php utils/generateEncryptionKey- Copy the generated key to
.envasAPP_ENCRYPTION_KEY.
Repeat for:
php cli.php utils/generateEncryptionKey- Copy the second key to
.envasJWT_ENCRYPTION_KEY.
7️⃣ Create Database
- Go to Databases → Add Database.
- Set:
- Database Name:
clientname_db - Related Site: the client’s domain.
- Database User:
clientnameUser - Generate a strong password (avoid special characters if possible).
- Database Name:
- Copy the DB name, user, and password into your
.env. - Return to the Plesk Database creation window:
- Grant access to all DBs within the subscription.
- Set Access Control → “Allow local connections only.”
- Click Create Database.
8️⃣ Install Dependencies & Run Migrations
In Plesk Git settings, click:
- Scan
- Install Composer dependencies
Connect via SSH (WinSCP, PuTTY, or terminal):
cd /var/www/vhosts/clientdomain.com/httpdocs/Run migrations and seeds:
bashsudo -u ClientUser /opt/plesk/php/8.1/bin/php migrator.php migrate sudo -u ClientUser /opt/plesk/php/8.1/bin/php migrator.php seed:run --seed=InitialSeed(Tip: type part of the username and press
Tabfor autocompletion.)
9️⃣ Setup SSL with Let’s Encrypt
Provide the server’s IP to the person managing Cloudflare.
Once DNS is pointed, go to:
Plesk → SSL/TLS Certificates- Select Install Let’s Encrypt certificate for the domain.
If a 500 error appears after SSL installation:
- Ensure your
.envincludes:CDN_DISABLE=true - If it still persists, clear cached files:
httpdocs/cache/el/
- Ensure your
✅ Your new client’s domain is now fully set up on Plesk!