Question

Using DO Droplet can I duplicate a Wordpress site for testing purposes?

Posted March 24, 2019 539 views
WordPressUbuntu 16.04

I have an existing website hosted by a different company. I want to create a private Wordpress site in DO and copy my domain to this private site for testing. My question is can this be done? Not looking for a how to - just can it be done. If someone has already done something similar any lessons learned would be great.

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.

×
1 answer

Greetings!

This can absolutely be done. The steps are going to vary based on where you’re coming from (shared hosting, for example, is a different process than a pure LAMP server). I know you said you weren’t asking for a how-to, but I just want to cover the high level points for this:

On the other side:

  • Export database
  • Prepare files for transfer (zip, make backup, whatever has to be done)

On this side:

  • Create droplet with LAMP configuration
  • Move your files from the other host to the web server’s document root
  • Import database

Then you need to change the Wordpress URL on the duplicate site. Otherwise it’ll redirect back to your production site when you visit it. Changing the host file on your system can change that, but you’ll be changing it back and forth to go between dev/prod, and that isn’t reasonable for most people. Some tips on changing the URL:

https://codex.wordpress.org/Changing_The_Site_URL

Jarland

Submit an Answer