Question

Create test version of WordPress site

Posted June 17, 2021 124 views
Miscellaneous

I am trying to create a copy of my Wordpress site (omcmotorhomes.co.uk) so I can use it for testing. I have pretty basic knowledge when it comes to hosting websites.

What I have done so far;

I created a snapshot of my existing droplet
I used the snapshot to create a new droplet
I then added a DNS record to point test.omcmotorhomes.co.uk to the droplets IP address

I expected this to work but it didn’t, I presume it was naive of me to expect it to work?

Anyone got any ideas what I need do to get it working

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @daveRay,

You need to update our WebServer’s Configuration file and your Database both still contain information about your main domain.

Let’s start with your WebServer. First, you need to understand if you are using Apache or Nginx.

SSH to you droplet and type in:

nestat -tulpen | grep 443

There you’ll see either Nginx or Apace. Depending on the answer do one of these instructions:

Apache

Go to your Apache directory and list the current configurations:

cd /etc/apache2/sites-enabled; ls -lah

In there you’ll/should see a file of your domain like so - domain.conf OR just a default file.

Inside of this file, if you open it, you should be able to see your main website - omcmotorhomes.co.uk. Update it to be testing.omcmotorhomes.co.uk or whatever you want to use.

Once you are done, save the file and restart Apache

systemctl resart apache2

Nginx
Go to Nginx’s directory and list he current configuration:

cd /etc/nginx/sites-enabled; ls -lah

In there you’ll/should see a file of your domain like so - domain.conf OR just a default file.

Inside of this file, if you open it, you should be able to see your main website - omcmotorhomes.co.uk. Update it to be testing.omcmotorhomes.co.uk or whatever you want to use.

Once you are done, save the file and restart Nginx

systemctl resart nginx

Now comes the harder part. Your WordPress database also includes your main domain inside its database. You need to update it from there as well. Here I’ll recommend checking Google for relevant articles that go over the process. If I was you, I would search for something similar to : wordpress update domain in database