Should I create a subdomain for testing

12 replies
  • WEB DESIGN
  • |
I am trying to add custom page types in WP just now and am struggling a bit with some code.

The problem is I only have my live site to work with which isn't great.

My questions is, can I create a subdomain, copy over all my main domain files and folders then test on that with no affect on the main site?
#create #subdomain
  • Profile picture of the author jleavitt13
    Yes you can. I would make sure to select the box in the WP Setting which makes it so your website pages are not searchable just to make sure nobody stumbles upon it while in testing. But that is how I have done all of my testing.

    You will need to do a separate install of wordpress into your subdomain, which if you are using GoDaddy or some other web hosting services you will need to do a manual install of wordpress into your subdomain. If you follow WordPress's install instructions carefully it is not too bad at all.

    Doing will have no effect on your main website.
    {{ DiscussionBoard.errors[3791996].message }}
  • Profile picture of the author Abledragon
    My hosting is with Hostgator on one of the unlimited domains packages, and I have a separate domain with 3 instances of WordPress installed in 3 sub-directories, purely for testing and doing designs for clients.

    It's essential to have a test installation - especially if you do designs for clients.

    Cheers,

    Martin.
    Signature
    WealthyDragon - Earning My Living Online
    {{ DiscussionBoard.errors[3792095].message }}
  • Profile picture of the author Christian Little
    Yes you can do that, but you will need to manually update some database fields once you move it.
    {{ DiscussionBoard.errors[3792347].message }}
  • Profile picture of the author LastWarrior
    A couple of other options to consider too is registering another domain just for that purpose or find a place that offers free websites. Either way, you'll have a place to practice at.

    LastWarrior
    Signature



    {{ DiscussionBoard.errors[3793410].message }}
    • Profile picture of the author ballanrk
      Just in case....

      If your testing and do not need to be on the Internet you should check out MAMP for Mac or MAMP for windows(alternatives to MAMP). Internet testing is needed in the final stages I know but using a local server and Wordpress is such a huge time saver. Wordpress will run just as if it's live including plugins,etc. Plus you can run multiple installs without creating numerous sub domains.

      Probably obvious info but....

      Ballanrk
      Signature
      POP the Champagne cork I can PM now!

      Success usually comes to those who are too busy to be looking for it......


      -Henry David Thoreau
      {{ DiscussionBoard.errors[3799736].message }}
  • Profile picture of the author Istvan Horvath
    Originally Posted by cyoung75 View Post

    My questions is, can I create a subdomain, copy over all my main domain files and folders then test on that with no affect on the main site?
    NO! You can not. Not in the way you described (even if some people say you can... <sigh>)

    First of all that thing would not work for several reasons.

    Next, even if I told you how to make it work... it would connect to the database of your existing site, so any changes would be visible there: all your content (posts, Pages, comments, settings!) are stored in the database, not in files.

    Why not just make a new installation on that subdomain, giving it its own DB and everything?
    Signature

    {{ DiscussionBoard.errors[3799783].message }}
    • Profile picture of the author Christian Little
      Originally Posted by Istvan Horvath View Post

      NO! You can not. Not in the way you described (even if some people say you can... <sigh>)

      First of all that thing would not work for several reasons.

      Next, even if I told you how to make it work... it would connect to the database of your existing site, so any changes would be visible there: all your content (posts, Pages, comments, settings!) are stored in the database, not in files.

      Why not just make a new installation on that subdomain, giving it its own DB and everything?
      Ohh it's not that hard Istvan, geesh!

      Step 1: Copy the database into a new database

      Step 2: Copy the files to the subdomain folder

      Step 3: Edit wp-config.php to use the new database

      Step 4: Go into the database via PHPMyAdmin and edit the wpsettings table, look for anything that has a URL (should be 3 rows). Change them to the URL of the subdomain.

      Step 5: Go the the subdomain in a web browser, login to wordpress, and verify the links in the General settings look right.

      Step 6: Go the Permalinks section and save them.

      Step 7: Load the site in a web browser and test a few posts.

      Total time: About 5 minutes if you know what you're doing. I did it for a customer yesterday and it works just fine.
      {{ DiscussionBoard.errors[3801049].message }}
  • Profile picture of the author puedall
    Originally Posted by cyoung75 View Post

    I am trying to add custom page types in WP just now and am struggling a bit with some code.

    The problem is I only have my live site to work with which isn't great.

    My questions is, can I create a subdomain, copy over all my main domain files and folders then test on that with no affect on the main site?
    Hi
    I use wordpress plugin called multi site.
    create as many sub domens as you like, does great job
    Hope this help
    {{ DiscussionBoard.errors[3820633].message }}
    • Profile picture of the author Shelle-K
      I test everything locally with wamp

      That way I can take it with me anywhere and I don't have to have an internet connection to work. Saves lots of time in testing also
      {{ DiscussionBoard.errors[3823429].message }}
    • Profile picture of the author Istvan Horvath
      Originally Posted by puedall View Post

      Hi
      I use wordpress plugin called multi site.
      Why plugin? The MultiSite feature is built in since version 3.0...
      Signature

      {{ DiscussionBoard.errors[3823535].message }}
      • Profile picture of the author jamesg3
        Use xamp or wamp on your pc, build and test Wp sites on your pc. No internet or server needed.
        Signature
        Serious Wordpress sites, html/css sites and flash sites Cheap. I provide killer SEO, easy to use e-commerce solutions and payment gateways. Check me out at Serious Website Design.
        Need Hosting with serious speed and power? 3.99 a month. Take a look here. Serious Website Hosting.
        {{ DiscussionBoard.errors[3830779].message }}
        • Profile picture of the author Shelle-K
          Originally Posted by jamesg3 View Post

          Use xamp or wamp on your pc, build and test Wp sites on your pc. No internet or server needed.
          I haven't tried xamp but I use wamp (as mentioned previously) and I can't recommend it enough. I previously used a testing domain online for everything but it slowed me down. Since I switched over to wamp, I crack things out so much quicker in the testing environment...I love it!
          {{ DiscussionBoard.errors[3831541].message }}

Trending Topics