Creating a staging subdomain for a WordPress site hosted with Blacknight is a sensible way to test updates, plugins, themes, and code changes before touching the live website. A staging environment gives you a controlled copy of your site, usually placed at a subdomain such as staging.example.com, where you can work safely without exposing visitors to unfinished changes.
TLDR: Set up a subdomain in your Blacknight hosting control panel, install or copy WordPress to that subdomain, then duplicate your live site files and database into the staging location. Update the staging site’s configuration so it uses its own database and URL, then block search engines and restrict public access. Once testing is complete, carefully move approved changes back to the live site using backups and a controlled deployment process.
Why Use a Staging Subdomain?
A WordPress staging subdomain is not just for developers. It is useful for anyone who manages a business website, online shop, membership site, or active blog. WordPress updates can sometimes conflict with themes or plugins, and even small changes can affect layouts, forms, checkout pages, or performance.
Using a staging site allows you to:
- Test WordPress core, theme, and plugin updates before applying them to the live site.
- Preview design changes without disrupting visitors.
- Troubleshoot errors in a safer environment.
- Train staff or editors without risking live content.
- Prepare larger site improvements before publishing them.
For a Blacknight-hosted WordPress site, the exact screens may vary depending on your hosting package and control panel, but the general process is the same: create a subdomain, place a WordPress copy there, connect it to a separate database, and secure it properly.
Before You Begin
Before creating the staging subdomain, make sure you have access to the relevant Blacknight hosting control panel, your domain’s DNS settings if required, and your WordPress administrator account. You should also have FTP or file manager access and the ability to create a MySQL database.
Most importantly, take a full backup first. This should include both the WordPress files and the database. A staging setup usually involves copying files, exporting databases, and editing configuration values, so a reliable backup gives you a safe recovery point if anything goes wrong.
You should also decide on the staging address. A common format is:
- staging.example.com
- dev.example.com
- test.example.com
For clarity and professionalism, staging.example.com is often the best choice.
Step 1: Create the Subdomain in Blacknight
Log in to your Blacknight hosting control panel and look for the section related to domains, websites, or subdomains. The exact label may differ depending on the hosting environment, but you should be able to add a new subdomain under your existing domain.
Create a subdomain called staging. This will normally create a document root or folder for the subdomain, such as:
- /staging
- /staging.example.com
- /httpdocs/staging
Make a note of the folder location because this is where the staging WordPress files will go. If your DNS is managed through Blacknight, the subdomain may work automatically. If DNS is managed elsewhere, you may need to create an A record or CNAME record pointing the subdomain to the correct hosting server.
Step 2: Add SSL to the Staging Subdomain
A staging site should use HTTPS, especially if you are testing logins, forms, shopping carts, or user accounts. In the Blacknight control panel, look for SSL or security options and issue a certificate for staging.example.com. If available, a free Let’s Encrypt certificate is usually sufficient for a staging environment.
After enabling SSL, visit the staging URL in your browser. If the certificate is active, the address should load with https:// and show no browser security warning. If it does not work immediately, allow some time for DNS and certificate provisioning to complete.
Step 3: Copy Your WordPress Files
Next, copy the files from your live WordPress installation into the staging subdomain folder. You can do this using the hosting file manager, FTP, SFTP, or a migration plugin. The files to copy include the WordPress core files, themes, plugins, uploads, and important configuration files such as wp-config.php.
This step creates the file structure of the staging site, but it does not yet create a separate working copy of the database. WordPress stores pages, posts, menus, plugin settings, users, and many configuration values in the database, so the database must be copied separately.
Step 4: Create a Separate Staging Database
In the Blacknight hosting control panel, create a new MySQL database for the staging site. Use a clear name that helps you identify it later, such as one containing the word staging. Create or assign a database user with the correct permissions, and securely record the following details:
- Database name
- Database username
- Database password
- Database host
Then export the live WordPress database using phpMyAdmin or another database tool provided through your hosting account. Import that export file into the new staging database. At this point, the staging database should contain a copy of the live site’s content and settings.
Step 5: Update wp-config.php
Open the wp-config.php file inside the staging subdomain folder. Update the database settings so the staging WordPress installation connects to the staging database rather than the live one.
The relevant values are usually:
- DB_NAME
- DB_USER
- DB_PASSWORD
- DB_HOST
This is a critical step. If the staging site accidentally connects to the live database, changes made in staging could affect the public website. Double-check the database name before saving the file.
Step 6: Replace the Site URL
The copied database still contains references to the live domain. You need to update these references to the staging subdomain. At minimum, change the WordPress siteurl and home values from the live URL to the staging URL.
You can do this in phpMyAdmin by editing the wp_options table, although your table prefix may be different. Change values such as:
- https://example.com to https://staging.example.com
- http://example.com to https://staging.example.com
For a more complete change, use a reliable search-and-replace method that handles serialized WordPress data correctly. Many administrators use WP-CLI or a reputable migration plugin for this task. Avoid basic text replacement directly on the SQL file unless you understand the risks, because WordPress stores some data in serialized formats.
Step 7: Protect the Staging Site
A staging site should not be treated like a public website. It may contain unfinished work, duplicated customer records, draft content, or plugin configurations that should not be indexed by search engines.
Take the following precautions:
- In WordPress, go to Settings > Reading and enable Discourage search engines from indexing this site.
- Add password protection to the staging subdomain from the hosting control panel if available.
- Consider limiting access by IP address if the site contains sensitive information.
- Disable outgoing transactional emails where appropriate, especially on WooCommerce or membership sites.
Do not rely only on the WordPress search engine visibility setting. It is a request to search engines, not a security control. Password protection is strongly recommended.
Step 8: Test the Staging Site Carefully
Visit https://staging.example.com and check that the site loads correctly. Log in to the WordPress dashboard and verify that pages, posts, images, menus, forms, and plugins are working as expected.
If you see redirects back to the live site, mixed content warnings, missing images, or login problems, the most likely cause is an incomplete URL replacement or a plugin enforcing the live domain. Clear any caching plugins and server-side cache, then test again.
For WooCommerce or other dynamic sites, be especially careful. A staging copy of an ecommerce site may contain customer data and order history. Disable live payment gateways, prevent real emails from being sent, and make sure the staging site cannot receive actual customer orders.
Step 9: Move Changes Back to Live
When your testing is complete, do not casually copy the entire staging site over the live site unless you are certain that is appropriate. For brochure websites, a full deployment may be simple. For busy ecommerce, booking, or membership websites, the live database may have changed while you were working on staging.
A safer deployment approach is to:
- Back up the live site again immediately before deployment.
- Move only approved theme, plugin, or code changes where possible.
- Repeat tested update steps on the live site during a low-traffic period.
- Verify the live site immediately after deployment.
If the site is business-critical, consider involving a qualified WordPress developer or your hosting support team before pushing major database changes live.
Final Checks
A Blacknight WordPress staging subdomain is a practical safeguard for responsible website management. Once it is configured correctly, it becomes a reliable place to test updates, investigate issues, and prepare improvements without unnecessary risk to your live website.
Keep the staging environment updated, protected, and clearly separated from production. With separate files, a separate database, HTTPS, restricted access, and careful deployment habits, your staging subdomain can become an essential part of maintaining a stable and professional WordPress site.