January 18, 2018, 03:31:39 PM

Author Topic: Subdomain for testing  (Read 1060 times)

pmccloud

  • Student
  • *
  • Posts: 27
  • Karma: +3/-0
    • View Profile
    • TheMuscleCarGuy.net
    • Email
Subdomain for testing
« on: December 12, 2012, 09:54:34 AM »
I am trying to set up a copy of my blog in a subdomain for testing.  I got the subdomain set up, and wordpress installed, but how to I get it to be a copy of my existing site?  I exported the database from my existing site, and replaced the original URL with the new one and imported it into the database on the new site, as well as copying the files over.

But when I do that, I just get a blank page when I try to go to the test site.

Is there a better way to create a development copy of my web site?  I would assume so, since mine didn't work.

Any help would be appreciated.

pmccloud

  • Student
  • *
  • Posts: 27
  • Karma: +3/-0
    • View Profile
    • TheMuscleCarGuy.net
    • Email
Re: Subdomain for testing
« Reply #1 on: December 12, 2012, 03:52:32 PM »
I got this figured out.  I will write up what I did to make it work later so other people will know how in case they want to.

pmccloud

  • Student
  • *
  • Posts: 27
  • Karma: +3/-0
    • View Profile
    • TheMuscleCarGuy.net
    • Email
Re: Subdomain for testing
« Reply #2 on: December 13, 2012, 10:49:24 AM »
Ok, so here are the steps I did to create a subdomain for testing purposes.

  • Since I use HostGator, I created a subdomain using their cPanel, I just called mine testing.
  • Then I installed Wordpress on that subdomain using Fantastico.  It gives you the option to install in a sub domain
  • Then I went into phpMyAdmin, selected the database for my original site, in this case it was _wrdp1 on the left
  • I went under export, left the defaults and clicked go
  • When it finished downloading, I opened the backup in a text editor to change the values to match the new site (I used NotePad++ since it is a large file)
  • I changed _wrdp1 to _wrdp2 to match the new database with find and replace
  • I changed the URL from the old to the new the same way.
  • I switched to the new database and imported the file
  • Using File Manager from cPanel, I copied all the subfolders from public_html to testing.  Do not copy the files that are in public_html directly, as they are the WordPress config files that tell WordPress how to connect to the database, that is what I did wrong the first time.

It did take a while, not exactly sure how long, for all the files to copy.  File Manager doesn't appear to give any feedback on the progress though.

Hopefully this helps anyone who is trying to do the same thing.