QUICK NEWS

{NEW} - A new css video is up.

{OLD} - New video courtesy of Skhilled, Thanks for posting it up.

Video of the moment:


Internal Links

SMF Sites

Quick Info

Duplicate for upgrade test

Started by LandyVlad, Feb 27, 2023, 05:03 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

LandyVlad

Can someone please point me toward the best way to duplicate my forum so I can do an upgrade test, while making sure that the orighinal files & database are in no way effected by the duplicate one.

I can use a unique url (and host account) for the testing.
Please do not PM me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Dave

#1
Quote from: LandyVlad on Feb 27, 2023, 05:03 PMCan someone please point me toward the best way to duplicate my forum so I can do an upgrade test, while making sure that the orighinal files & database are in no way effected by the duplicate one.

I can use a unique url (and host account) for the testing.

Firstly backup everything just incase you delete a wrong file

If you are allowed by your host,

1. create another folder on the root of your current forum (call it 'backup')
2. create a new database (note the database needs to have a different name to your existing)
3. Upload the files for a new install for SMF to the new folder and install a new forum using the new database, call it what you want
4. Once installed, delete all the files in the folder and upload a copy of all the smf files from your current site to the new folder.
5. Now go to the settings.php file, the one you've just uploaded, and change the old database username and password to the new database username and password you've just created.

Don't go to the new forum yet

6. Download your current database (use the export button at the top of the phpMyAdmin window)  Make a second copy of it and put it somewhere safe, now open the downloaded database file with Notepad++.

This next step is very critical to do before you do anything else with the database you've downloaded. Again using Notepad++, with your database in the window, use 'Ctrl+F' to open the find box, once that's open see the tab at the top it's on 'Find', now click on the 'Replace' tab. Once you are there in the 'Find What' box type in the full website address for your existing site i.e. 'https://www.mysite.com' now type into the bottom box 'Replace with' 'https://www.mysite.com/backup';, once you've done that click on 'Replace all' I think you can guess what will happen.

7. Now using phpMyAdmin delete all the new tables for the new forum.
8. Now click on the 'SQL' button at the top of the phpMyAdmin window for the new database, paste into the box that opens the copied database from Notepad++. (NOTE: If your database is very big you'll need to do this in different installments as sometimes the operation can time out if it takes to long. What I've had to do previously is break down the old database into bite size pieces by copying so many tables and then pasting them into new page each time and do it that way.)
9. Once the database is uploaded
10. Find and upload 'repair_settings.php' to the root of the new folder then point your browser towards www.mysite.com/backup/repair_settings.php and ensure that all the paths are correctly pointing to the new site not the old one.

Now go to 'www.myoldsite.com/backup' if everything has gone OK you should see a duplicate of your main site there, with all the posts and members etc.

If you want play quizzes or games click below

LandyVlad

Wow, complex but an awesome explanation. thank you!
Please do not PM me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.