There was a problem loading the comments.

Create a staging copy of a website on a subdomain in Plesk (non‑WordPress)

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Staging is a separate copy of your website used for testing updates and changes. Even if your website is not WordPress, you can still create a staging copy on GARMTECH hosting by using a subdomain such as stage.yourdomain.tld.

Before you start

  • Decide the staging hostname (common options: stage, dev, test).
  • If the site uses a database, make sure you know where the database credentials are stored (for example, config.php, .env, settings.php).

Step 1 — Create a subdomain in Plesk

  1. Log in to Plesk (open from My.GARMTECH).
  2. Go to Websites & Domains.
  3. Click Add Subdomain.
  4. Enter the subdomain name (for example, stage).
  5. Keep the suggested document root or set a clear path such as /stage.
  6. Click OK to create it.

Step 2 — Copy website files to the staging document root

You can copy files using:

  • Plesk File Manager (fast for small/medium sites)
  • FTP‑SSL (recommended for large sites)

Typical approach:

  1. Open the production document root (usually httpdocs).
  2. Create an archive (ZIP) of your website files.
  3. Upload the archive to the staging document root (for example, /stage).
  4. Extract the archive in the staging folder.

Step 3 — Clone the database (if your site uses one)

  1. In Plesk, go to Databases.
  2. Create a new database for staging (for example, yourdb_stage) and a database user.
  3. Export the production database in phpMyAdmin (Export → Quick/Custom).
  4. Import the dump into the staging database (phpMyAdmin → Import).

Step 4 — Update configuration for staging

  • Update database credentials in your site config file (new DB name/user/password).
  • If the site contains absolute URLs, update the base URL to the staging domain (many frameworks store it in config or database).

Step 5 — Protect the staging site

Staging should not be publicly accessible or indexed by search engines.

  • Add password protection in Plesk (for example, “Password-Protected Directories”).
  • Optionally restrict by IP if you have a fixed IP.
  • Add a robots.txt to disallow indexing, for example:
    User-agent: *
    Disallow: /

Step 6 — Enable SSL for the subdomain

Issue/extend a Let’s Encrypt certificate in Plesk and include the staging subdomain so you can test via HTTPS.

Tips

  • Use staging for updates first, then apply the same change on production.
  • Keep staging data separate (highlight it visually so it is not confused with production).

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

Tags

© GARMTECH