Advertisement:

Author Topic: Can I make my test site like new without messing up my main site?  (Read 680 times)

Offline Jsizizzle

  • Semi-Newbie
  • *
  • Posts: 67
My main site is at playersprogramu.com and my test site is at playersprogramu.com/smf   I'm having a lot of problems with the test site and would like to start over on it Making it like its virgin state without messing up my main site. Can I do this and how would I go about doing this?  On a side note. I thought I could just install smf new in another folder which I did at playersprogramu.com/testsite and that site came out just like my main site minus the simple portal tables and all links go to my main site. It's just a mess. Thanks in advance for your help

Offline showngo

  • Jr. Member
  • **
  • Posts: 108
Re: Can I make my test site like new without messing up my main site?
« Reply #1 on: May 21, 2017, 02:45:59 AM »
REF Godaddy servers.
If your server is like Godaddy, you will run into problems if you use the same DB.   Everything will populate the same for both including errors.   If you make a new DB nothing should link over (Starting from scratch) unless there are hyperlinks embedded that point to the main pages.
I have copied tables in MyPhP to use in my test sites new DB but they need to be unique.
New location    xxxx/newsite    and new DB name.   

I ran into that at first and also found out that the DB name can not be the same as ANY on a server so if it is a shared server, anyone who gets a name first, you can not use that.

Offline Colin

  • Lead Developer
  • SMF Hero
  • *
  • Posts: 7,760
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Can I make my test site like new without messing up my main site?
« Reply #2 on: May 21, 2017, 02:53:37 AM »
Copy the forum directory, export the database tables (structure+data), create a new database import your exported database dump. Change the database credentials in Settings.php. Fix the paths and URLs in SMF to correlate to the new directory that you just created (the copy).
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,073
  • 'Tis the gift to be simple
Re: Can I make my test site like new without messing up my main site?
« Reply #3 on: May 21, 2017, 11:22:54 PM »
Copy the forum directory, export the database tables (structure+data), create a new database import your exported database dump. Change the database credentials in Settings.php. Fix the paths and URLs in SMF to correlate to the new directory that you just created (the copy).

^ This.  After you've imported the dump into the new database, run repair_settings.php to correct paths.  What you don't want to do is connect your production forum and test forum to the same database.

Offline Jsizizzle

  • Semi-Newbie
  • *
  • Posts: 67
Re: Can I make my test site like new without messing up my main site?
« Reply #4 on: May 21, 2017, 11:39:27 PM »
I'm totally confused on how to go about doing this.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,073
  • 'Tis the gift to be simple
Re: Can I make my test site like new without messing up my main site?
« Reply #5 on: May 21, 2017, 11:54:20 PM »
- Create a new database.
- Upload the full install package to new directory.
- Run install.php.
- Import the database dump from your production forum into the new database.
- Run repair_settings.php in the new install.
- Run fix_packages.php in the new install.

This will give you a clone of your production forum with separate database and no mods installed.


Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,098
  • Gender: Male
    • Kindred-999 on GitHub
Re: Can I make my test site like new without messing up my main site?
« Reply #6 on: May 22, 2017, 06:19:52 AM »
ummmm....  no, that won't give the a clone -- that will give them a clean install with a copy of production data - they won't have any of the mods or themes.

To create a clone

1- create a new database
2- back up your production database
3- import the backup into your new database
4- copy all of the files from your production site to a new location
5- run repair_settings.php in the new location to update the basic forum path, urland database connection details. (SAVE)
6- re-run repair_settings.php in the new location to update bthe secondary forum paths and urls (SAVE)

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,048
Re: Can I make my test site like new without messing up my main site?
« Reply #7 on: May 22, 2017, 07:23:50 AM »
well the subject of this topic says to make the test site like "new" does not say a clone.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,073
  • 'Tis the gift to be simple
Re: Can I make my test site like new without messing up my main site?
« Reply #8 on: May 22, 2017, 01:14:12 PM »
This will give you a clone of your production forum with separate database and no mods installed.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 7,073
  • 'Tis the gift to be simple
Re: Can I make my test site like new without messing up my main site?
« Reply #9 on: May 22, 2017, 11:36:43 PM »
Actually, Kindred and Illori are correct, I used the wrong word.  If you want to run your production database on a clean install, follow the steps I posted.  If you want to duplicate (clone) your production forum in a different directory, with all mods and customizations intact, follow the steps Kindred posted.