How do I create a test copy of my website?

Linode Staff

How can I create a test or staging website and point it to a subdomain?

2 Replies

You can do this in a variety of ways, either on a single Linode or on multiple Linodes. If you choose to keep your testing website on your production Linode, we'd recommend one of the following methods:

1.) Hosting multiple websites on a single Linode

  • We have a guide available here that goes over virtual hosts in Apache, and one here that discusses name-based virtual hosting in Nginx. This allows you to instruct your web server which site to show for a specific subdomain. If you're using a service such as Wordpress, you may find this guide to be more useful.

2.) Using a containerization service such as Docker

  • This will allow you to run a containerized version of your testing site within Docker, providing another degree of separation between your test site and your production site.

Once you have your test site running, you can set up a subdomain to point to your Linode's IP address. If you're using two separate Linodes, this is relatively simple, as you would just set up the A record as test.website.com and point it to your second Linode. If you're using a single Linode, you can point the subdomain at your Linode's IP address, and use virtual host files to tell your web server to pull up the test site when that subdomain is visited.

It's worth noting that if you'd like your site to be more protected, a password-protected landing page may be useful. You can do this via the .htaccess file.

I am totally late to the party here, but I am doing the same but on a separate linode. How would I push the changes once they are made?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct