Creating a duplicate of your entire live site on a separate installation is one of the popular features of SiteGround shared hosting plans. This is called as staging and used for testing and developing without disturbing your live site. SiteGround offers the staging option for WordPress and Joomla based sites. In this article, we will explain how to create WordPress staging site in SiteGround and restore the content.
Features of Staging Site
SiteGround offers creating a staging site as part of their GoGeek shared hosting plan which will cost around $17.99 per month (the price drastically changes all over the year). Other two shared hosting plans “StartUp” and “GrowBig” do not have this staging function.
- Staging feature allows you to create a duplicate of your live site with single click to a separate testing environment.
- Entire site content is copied to a testing site on which you can test the new themes, plugins or do any other development work.
- The beauty is you can push the staging site to a live environment with single click.
Do not confuse Staging and daily backup features. SiteGround automatically takes a backup of your live site as part of all sharing hosting plans and allows you to restore in case of emergency. However, you will NOT have a URL to access backup copies while staging setup has its own URL to access WordPress admin and edit your content.
How to Create WordPress Staging Site in SiteGround?
Login to your SiteGround account and go to “Websites” tab. Click on the “Site Tools” button showing against or below the site that you want to create a staging site.
When you are in “Site Tools” section, navigate to “WordPress > Staging” section. Make sure your domain is selected under “Select WordPress Installation” dropdown. Provide a name for your staging site in “Staging Name” box and click “Create” button.
If you have files or folders on your root directory other than WordPress installation, then you will be prompted to select those files for copying to staging site. Select the required files and click on “Confirm” button to go to the next step.
You will see a “Staging site is created” success message and the name of the staging site will be listed under “Manage Staging Copies” section.
Password Protecting Staging Site
This is an important step in protecting a staging site from public access. After creating a staging site, click on the “Go to Protected URLs” button. Alternatively, you can anytime navigate to “Security > Protected URLs” section in Site Tools.
Provide the username, password for your staging site and click the “Protect” button. Make sure to copy and save your credentials on your computer so that you will not forget.
You will see a message “Staging site is protected” as shown below.
SiteGround will use subdomains for creating staging sites like “https://staging1.yoursite.com”, “https://staging2.yoursite.com” and so on. The entire site along with content, database and images will be copied to the staging environment. When a user or search engine tries to access the staging site’s pages, they will be prompted to enter the username / password in a pop-up before proceeding. Cancelling the popup or providing wrong details will result in “401 – Unauthorized” error.
This password protection is the only way to stop users and search engines not to view or index your staging sites. If you do not protect the staging site with password, then search engines will crawl and index your staging site. This will result in content duplication and search engines may penalize your live site for this.
Accessing and Deploying Staging Sites
As mentioned above, go to “WordPress > Staging” section where you can see the created staging site under “Manage Staging Copies” section. From here, you can login to the WordPress admin panel and manage the deployment back to live site.
Click on the “Log in to Admin Panel” icon (first icon showing below “Actions” column) to go to the WordPress admin login page of the staging site. Remember, you can also directly use the staging URL to login to your dashboard. The login username and password are same as your live site since they are also copied during staging site creation. Login with your credentials and start doing your work similar to regular WordPress site.
You can move the changes to live site by clicking on the “Full Deploy” or “Custom Deploy” option. It is also possible to delete the staging site by clicking on the “Destroy” menu and confirm your action.
Limitations of SiteGround Staging Function
Though the feature is free on GoGeek and Cloud hosting plans, it has lot of limitations.
- It works only on single site installation and not on multisite installation.
- Your server should have sufficient free storage (>51%) and inodes (>20%).
- You can have maximum 10 staging sites with 15 daily operations.
- Staging site works only if your database is less than 2GB in size.
- If you are using third-party nameservers (like Cloudflare), you should manually add DNS A records for the subdomains created for staging sites.