If you have a production website and are planning major site changes, consider setting up a staging site — a separate location on the server where you can conveniently update and test a copy of the site before putting it into production.
We recommend that you work with a staging site in the following way:
-
Decide where you want to host the development copy and prepare the development environment. You can choose to host it in the same webspace, in a separate webspace on the same server, or upload it to an FTP account on another server.
If you choose the same webspace, then you first need to set up a new website by adding a domain or a subdomain.
- (Optional step.) If you set up your development environment under your account in the Panel and your production site has APS applications installed via the Panel (at the Applicationstab), install the desired site applications in your development environment in the same subdirectory as you have on your production site. This step is optional; however, it will help you avoid changing manually database connection settings in the application scripts.
- Make a copy of the website and place it in the staging environment.
- Make copies of the databases used by the site and deploy them in the staging environment.
- Change database connection settings in the scripts to point at the databases in the staging environment.
- (Optional step.) Complete APS applications setup. Go to the Applications tab for your development site, locate the application in the list of installed applications, open its Settingsscreen and re-save the parameters. With this operation, the APS scripts should stop pointing at the production database and reconnect the application to the database copy. This step is needed if your production site has APS apps installed via the Panel and you performed Step 2 of the current instruction.
- Make the required changes to the site copy in the staging environment, and test them to make sure everything works as intended.
- Publish the updated site. This is done by pointing the document root of the production site to the staging site location.
To set up a site for staging purposes:
- Go to the Websites & Domains tab.
-
Click either Add New Domain or Add New Subdomain.
We recommend that you use a subdomain for staging purposes.
- Proceed as described in Adding More Websites or Adding Subdomains.
If you do not want your staging site to be accessible to the Internet users, do not register the newly added domain or subdomain name with a domain name registrar, or use an .htaccess
file (on Linux hosting) to restrict access to it.
To make a copy of website files:
- Go to the Websites & Domains tab.
- Click Website Copying (in the Advanced Operations group).
- If you have several websites, select the one you need and click Manage.
-
To copy website files to the document root of an existing site:
- Select the option Website in the Panel.
- Select the destination site from the Site name menu.
- Specify what to do with the files that might already be present in the destination directory.
-
To copy website files to an FTP account on this or another server:
- Select the option FTP storage.
- Specify the server's host name and credentials for connecting to the FTP account.
Senior Engineer Jessie
Comments