Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Jsizizzle on May 21, 2017, 01:11:39 AM

Title: Can I make my test site like new without messing up my main site?
Post by: Jsizizzle on May 21, 2017, 01:11:39 AM
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
Title: Re: Can I make my test site like new without messing up my main site?
Post by: showngo 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.
Title: Re: Can I make my test site like new without messing up my main site?
Post by: Colin 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).
Title: Re: Can I make my test site like new without messing up my main site?
Post by: Sir Osis of Liver on May 21, 2017, 11:22:54 PM
Quote from: Colin 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).

^ This.  After you've imported the dump into the new database, run repair_settings.php (http://wiki.simplemachines.org/smf/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.
Title: Re: Can I make my test site like new without messing up my main site?
Post by: Jsizizzle on May 21, 2017, 11:39:27 PM
I'm totally confused on how to go about doing this.
Title: Re: Can I make my test site like new without messing up my main site?
Post by: Sir Osis of Liver 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 (http://wiki.simplemachines.org/smf/Repair_settings.php) in the new install.
- Run fix_packages.php (http://wiki.simplemachines.org/smf/Manually_setting_a_package_installed_or_uninstalled) in the new install.

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

Title: Re: Can I make my test site like new without messing up my main site?
Post by: Kindred 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)

Title: Re: Can I make my test site like new without messing up my main site?
Post by: Illori 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.
Title: Re: Can I make my test site like new without messing up my main site?
Post by: Sir Osis of Liver on May 22, 2017, 01:14:12 PM
Quote from: Sir Osis of Liver on May 21, 2017, 11:54:20 PM
This will give you a clone of your production forum with separate database and no mods installed.
Title: Re: Can I make my test site like new without messing up my main site?
Post by: Sir Osis of Liver 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.