1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to create a Wordpress staging environment?

Discussion in 'Content Management' started by Mr.Dog, Oct 31, 2018.

  1. #1
    Hi,

    I have a huge 500+ page manually coded old-fashioned site, which I'd like to move to a CMS system - Wordpress is going to be.

    But - I'd like to keep the old site active for a while.

    How could I build up the new version of the site in parallel without replacing the old one?

    Should I install Wordpress on a subdomain? Can I then (later) EASILY move it to the main domain?

    Or, is there another way to fully (100%) test the new site's Wordpress version?
     
    Mr.Dog, Oct 31, 2018 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #2
    subdomain is how I'd do it, then when you're ready to go live move the wordpress files to the main host, change the url in the database (probably easier to do that manually) and hey presto! you're up and running.
     
    sarahk, Oct 31, 2018 IP
    Suckerpunch likes this.
  3. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    869
    Likes Received:
    35
    Best Answers:
    7
    Trophy Points:
    173
    #3
    Instead of installing WordPress on a separate sub-domain, you can create a staging environment for your site (which is usually a sub-domain) with limited access. Now with this site, you can test your changes or use it for complete development. After you have completed with site testing, you can then upload it to your live site.
    This will keep your old site active as well as allow you to test changes.
     
    MilesWeb, Nov 3, 2018 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #4
    What?
    Don't do a copy on a subdomain, put it on a subdomain?
     
    sarahk, Nov 3, 2018 IP
  5. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #5
    How do you mean that?

    It sounds like you're saying the same thing.
     
    Mr.Dog, Nov 10, 2018 IP
  6. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    869
    Likes Received:
    35
    Best Answers:
    7
    Trophy Points:
    173
    #6
    I mean to say that a staging environment is hosted on a private subdomain of your WordPress site so that you can build and test your website. You can create a clone of a live website to save time developing a similarly structured WordPress site from-scratch with staging.
     
    MilesWeb, Nov 12, 2018 IP
  7. AlphaNine_Vini

    AlphaNine_Vini Active Member

    Messages:
    218
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    88
    #7
    Yes, Install a dummy site on a subdomain or other domains . Test it well and change your domain in the database using PHPMyAdmin:

    You can look at this source for Mysql Commands:
    https://wpbeaches.com/updating-wordpress-mysql-database-after-moving-to-a-new-url/
     
    AlphaNine_Vini, Nov 28, 2018 IP
  8. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #8
    I decided to create a subdomain and install Wordpress there. The entire site.
    I am moving a large static site there.

    The big question is: how to move it later to the main domain?
     
    Mr.Dog, Dec 1, 2018 IP
  9. AlphaNine_Vini

    AlphaNine_Vini Active Member

    Messages:
    218
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    88
    #9
    After you are done with the testing on sub domain. Just go to PHPMyAdmin in your web hosting control panel. Then Go to the specific database > Go to tab section "SQL" and execute the following commands replacing the oldurl and newurl with your domain actual link including http:// or https:// (if ssl is intalled on your domain) . Here oldurl is your subdomain and newurl is your domain name. Supple your sub domain is abc.example1.com and your main domain is example.com . Replace 'oldurl' with http://abc.example.com and 'newurl' with http://example.com

    UPDATE wp_options SET option_value = replace(option_value, 'oldurl', 'newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

    UPDATE wp_posts SET guid = replace(guid, 'oldurl','newurl');

    UPDATE wp_posts SET post_content = replace(post_content, 'oldurl', 'newurl');

    UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl','newurl');

    After you are done with the above SQL command execution from PHPmyadmin. Use this same database with your main domain which is example.com is this message. If you need help let me know.
     
    AlphaNine_Vini, Dec 3, 2018 IP
    Suckerpunch likes this.
  10. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #10
    ^
    I'm confused. Is there a simpler way to move a site?
     
    Mr.Dog, Jan 2, 2019 IP
  11. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #11
    It doesn't get any simpler than that!
     
    sarahk, Jan 2, 2019 IP
  12. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #12
    Isn't there a way (I think there used to be) to build a blog fully in Wordpress, so that only you can see it and,
    then just hit "PUBLISH" and make public?
     
    Mr.Dog, Jan 3, 2019 IP
  13. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #13
    Kinda but I wouldn't want to be mixing WordPress files in with a legacy system.
     
    sarahk, Jan 3, 2019 IP
  14. AlphaNine_Vini

    AlphaNine_Vini Active Member

    Messages:
    218
    Likes Received:
    10
    Best Answers:
    1
    Trophy Points:
    88
    #14
    You can keep the visibility of the post to private instead public.
     
    AlphaNine_Vini, Jan 3, 2019 IP
  15. Mr.Dog

    Mr.Dog Active Member

    Messages:
    912
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #15
    That sure helps, I'm looking it up right now.

    Now I wonder: is there a way to build up the site on the subdomain, then download it and re-upload on the main domain?

    ...could this affect the links/URLs on the site? I will only be linking the pages together, will not be linking to the subdomain, but if I move the entire site to the main domain, then could the links somehow still be affected?
     
    Last edited by a moderator: Mar 28, 2019
    Mr.Dog, Jan 6, 2019 IP
  16. sarahk

    sarahk iTamer Staff

    Messages:
    28,494
    Likes Received:
    4,457
    Best Answers:
    123
    Trophy Points:
    665
    #16
    You can add those extra steps if you want to, you'll still need to run the sql updates though.
     
    sarahk, Jan 6, 2019 IP