How to Setup Temporary WordPress Staging Site

I’m going to Setup Temporary WordPress Staging Site using same MySQL database. It is very useful for you to develop themes or plugin without affect to your current running sites, and you need to use real data to test it out.

Prepare your contents

Copy all your current contents from

/var/www/juzhax.com

to

/var/www/dev.juzhax.com

Set a domain and Point your Apache or Nginx to

Modify WordPress file

After that edit the file in wordpress

/var/www/dev.juzhax.com/wp-includeds/options.php

Inside the function get_option

Put this code, save it.

Put the codes

if ($option == "siteurl" || $option == "home") {
  return "http://dev.juzhax.com";
}

Author: Justin Soo

https://plus.google.com/105604283199591348183