News:

Wondering if this will always be free?  See why free is better.

Main Menu

How to create an offline mirror of a SMF forum?

Started by Latharn, April 22, 2020, 12:17:30 PM

Previous topic - Next topic

Latharn

I hope this is the right board for this thread; otherwise please move it. I have used the search function, but did not find a fitting thread.

My domain and hosting plan soon terminate and I am considering not renewing them. I do not want to lose the SMF forum installation and all the posts; instead I would like to be able to store and view the forum offline on my personal hard-drive. Is that possible? I'm not particularly savvy with these things. I have all necessary access to the files and can download them, I just don't know what to do with them to be able to view them. Ideally I would like to be able to view the forums as they look now, and to use the search functions etc. as if the forums were still online.

If you need any further information to be able to help me, let me know. The SMF version is 2.0.13.

Doug Heffernan

The most important thing is to make a copy of your database. You can make a copy of your forum folder too, especially if you have instaleld a lot of mods and/or have made manual edits to the files.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Machette

It is clear that in addition to the database, the script itself must also be copied to the reserve. 8)

m4z

Basically follow this guide, with the "new host" being your local machine (which you have prepared as outlined by Sir Osis of Liver), and skip steps 9 and 10 (because they don't apply).
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

Latharn

Thanks to everyone for the answers. I've finally gotten around to giving this a try with XAMPP and the migration guide. I'm at "Step 5 - Run repair_settings.php on the new system to ensure that your paths, URLs, and database credentials are correct."

Unfortunately repair_settings.php wont run and returns the following error (I've replaced the actual name of the db server with "$db_server" etc. for security reasons):

QuoteFatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\web\homedir\public_html\forum\Sources\Subs-Db-mysql.php:58 Stack trace: #0 C:\xampp\htdocs\web\homedir\public_html\forum\repair_settings.php(371): smf_db_initiate('$db_server', '$db_name', '$db_user', '$db_passwd', '', Array) #1 C:\xampp\htdocs\web\homedir\public_html\forum\repair_settings.php(20): initialize_inputs() #2 {main} thrown in C:\xampp\htdocs\web\homedir\public_html\forum\Sources\Subs-Db-mysql.php on line 58

As far as I can understand, the line in question (in Subs-Db-mysql.php) is "function smf_db_initiate($db_server, $db_name, $db_user, $db_passwd, $db_prefix, $db_options = array())". I've figured out that the associated Database Info is in Settings.php and checked / corrected the entries to match the new locations.

Unfortunately, repair_settings.php still wont run. Any help would be appreciated!

shawnb61

Are you running php7?

SMF 2.0.13 won't run under php7...  (The mysql_ functions don't exist in php7, they are mysqli_ now...)

You need to run ~php5.6 to get your 2.0.13 forum up. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Latharn

Thanks everyone! I've managed to do it after updating the forum to the latest version first.

Advertisement: