Overview
This article explains how to create and manage a DreamPress staging site to test changes.
Background
A staging site allows you to test changes you plan to make while your live site remains up and running normally. When you're finished working on your staging site and have it configured the way you want, you can then publish those changes back into your live website.
Before you begin
When you enable staging for the first time, your DreamPress plan must have at least 5GB of free space. Additionally, the uploads folder is not copied to your staging site to use disk space efficiently. Replacing an existing image in your Media Library will update that image on your live site.
Lastly, a staging environment is not included in the DreamPress domain’s daily backups. You are responsible for maintaining your own backups of any content you add to the staging environment.
If your site has been previously hacked and then used DreamHost's DreamShield service, you must clean up or remove any disabled files before enabling staging.
Using Git
DreamPress Staging uses Git to copy files. If you have your own active Git repository in one of your live site's folders, the folder's contents will not be copied to your staging site. To use staging successfully, you can manually copy the folder's contents using SFTP or SSH. DreamPress recommends, as a best practice, managing your Git repository in a separate development environment instead of on your live site.
Copying your live site to the staging site
The following steps show you how to copy your live DreamPress site to your staging site. You can then test and work on the staging site without affecting the live site.
- Navigate to the Manage Websites page.
- Click the Manage button to open Website settings, which allows you to modify various configurations for your site.
- Click the WordPress tab.
-
Click the Create a Staging Site button.
A staging site is automatically created with a new name. Please note that you cannot give your staging site a custom name.
Once your website is finished copying to your staging site, an email confirmation is sent to you.
How to manage a staging site
After you create a staging environment, you can make various adjustments to it.
Viewing the staging settings
The Staging Website page appears, where your staging domain name appears at the top. The following settings also appear:
- Access Your Staging Website — shows the Username and Password you use to access your login-protected website.
- Staging WordPress Admin — opens the WP-Admin page where you can edit your staging website.
- File Upload — shows the FTP credentials for your staging website so you can transfer files through DreamHost's file manager or your third-party FTP client.
- Database (MySQL) — shows your database (MySQL) credentials so you can manage your databases using phpMyAdmin.
- Configure PHP — allows you to change the PHP version of your staging website when a newer PHP version is available. See the section below for more details.
Testing newer versions of PHP on staging
The Configure PHP option allows you to test newer versions of PHP on a staging site without affecting your live DreamPress website.
If your staging site works on a newer version of PHP, you can publish it and the newer version of PHP to your live DreamPress website. However, you cannot downgrade PHP on your live DreamPress site using this method.
Before proceeding, make sure you have published a copy of your live DreamPress website to Staging using the steps above.
The following steps show you how to change the PHP version of your staging website from the Staging dashboard.
- Navigate to the Manage Websites page.
- Click the Manage button to open Website settings, which allows you to modify various configurations for your site.
- Click the WordPress tab.
- Scroll down to the Manage Staging section and click the Manage button.
- Next to Configure PHP, click the Modify button.
- Select an available PHP version from the dropdown menu.
- Click the Change PHP to... button when finished.
Once the upgrade is complete, the dashboard shows the current version of PHP in use on your staging site under Configure PHP.
If your site works on the new version of PHP, you can publish changes from your staging website to your live DreamPress site. See this article for instructions.
How to access your staging site
The following steps allow you to view and log in to your staging site.
Viewing your login credentials
- Navigate to the Manage Websites page.
- Click the Manage button to open Website settings, which allows you to modify various configurations for your site.
- Click the WordPress tab.
- Scroll down to the Manage Staging section and click the Manage button.
- Next to the Staging WordPress Admin section, click the Show Credentials button.
Logging in to your site
You can then log in using either of the following options:
- WP Admin dashboard — using your WP admin user's login credentials,
- Panel — log in using the Staging Website dashboard. Click the Managing Staging WordPress button to log you in to the admin dashboard.
You may see the following Git status error message, which appears under Tools > Site Health (in the Background updates may not be working properly section under Security in the WP-Admin panel):
The folder /home/wp_xyz/example.com/ was detected as being under version control (.git).This message will always appear for every DreamPress staging site, and you can safely ignore it. Git will not cause any issues to your site.
Publishing your changes
When you're ready, you can use the Staging Website dashboard page to publish changes to your live website. See this article for more information.
Troubleshooting
If you receive a Publishing Failed message or the copied content does not match the staging site, do not make any further changes to the staging environment. You must contact support for further assistance.