1. Websta Hosting
Getting Started

How to Set Up a Staging / Development Site

How to Set Up a Staging / Development Site

A staging site is a private copy of your website where you can safely test changes before applying them to your live site.

Method 1: Subdomain Staging

  1. In DirectAdmin, create a subdomain: Subdomains → staging → your domain.
  2. This creates ~/domains/staging.yourdomain.com/public_html/.
  3. Copy your live site files to the staging directory via FTP or File Manager.
  4. Create a new database for staging (MySQL Management → Create New Database).
  5. Export your live database and import it into the staging database.
  6. Update wp-config.php (or your app's config) to point to the staging database.
  7. Search-replace your live domain with the staging domain in the database using WP-CLI or a plugin like Better Search Replace.

Method 2: Using Softaculous Staging

If you installed WordPress via Softaculous:

  1. Log in to DirectAdmin → Softaculous.
  2. Click Installations → find your WordPress install.
  3. Click Clone and set the target as a subdomain.

Password Protecting Your Staging Site

Keep it private using .htaccess basic auth:

AuthType Basic
AuthName "Staging — Private"
AuthUserFile /home/yourusername/.htpasswd-staging
Require valid-user

Create the password file via SSH:

htpasswd -c ~/.htpasswd-staging staginguser

Pushing Changes from Staging to Live

  1. Test everything on staging first.
  2. Back up your live site.
  3. Copy changed files from staging.yourdomain.com/public_html/ to public_html/.
  4. Export the staging database, import to live, and run any search-replace needed.
Still need help?

If this article didn't answer your question, our support team can help.

Contact support
All articles More in Getting Started