Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: me314159 - marraskuu 23, 2019, 03:38:53 IP

Otsikko: Change directory of where forum sits?
Kirjoitti: me314159 - marraskuu 23, 2019, 03:38:53 IP
I've got a really strange situation on my hands - due to a mishap in communication.

Is it possible to change the forum directory and still have it access the original database?   Everything else but the directory where the forum sits is the same (same hosting - same database).    I would imagine I'd have to dig into specific PHP files to update paths and whatnot.  Not sure how realistic this idea is - but no choice at this point (aside from a fresh install).

I've got the original forum downloaded via FTP (sadly, not an automated backup through the admin panel) - and now want to upload - do a different directory.     

Otsikko: Re: Change directory of where forum sits?
Kirjoitti: Gary - marraskuu 23, 2019, 03:59:43 IP
Actually, all you'd need to do is move the files to where you want them, and then run repair_settings.php so that all the paths (since some are contained in the DB) to the new values.

What is repair_settings.php? (https://wiki.simplemachines.org/smf/Repair_settings.php)
Otsikko: Re: Change directory of where forum sits?
Kirjoitti: me314159 - marraskuu 23, 2019, 07:56:34 IP
What I did was update the settings.php file - in just a few places.  This was enough to get the forum up on its feet again where I could then update the theme directory through the Admin panel. 

I still need to fix the files/images that users posted - they've gone missing.   

I did all this before realizing there was the repair_settings.php file.   I did run this - but got a weird message due to a 404 error.

Mostly, the forum is 99% fine. 

Here is that message (when running repair_settings.php).   

Ever feel you're in the wrong place

404 (Page Not Found) Error

If you're the site owner, one of two things happened:

1) You entered an incorrect URL into your browser's address bar, or
2) You haven't uploaded content.
If you're a visitor and not sure what happened:

1) You entered or copied the URL incorrectly or
2) The link you used to get here is faulty.
(It's an excellent idea to let the link owner know.)
Otsikko: Re: Change directory of where forum sits?
Kirjoitti: Herman's Mixen - marraskuu 23, 2019, 08:00:28 IP
What is repair_settings.php? (https://wiki.simplemachines.org/smf/Repair_settings.php) upload that and run it to fix your stuff ;)
Otsikko: Re: Change directory of where forum sits?
Kirjoitti: me314159 - marraskuu 23, 2019, 08:23:43 IP
I did already - the message it displayed is in my previous post above.
Otsikko: Re: Change directory of where forum sits?
Kirjoitti: me314159 - marraskuu 23, 2019, 10:11:30 IP
I believe my forum is 100% migrated now.   The last step for me was to update the attachments path - accomplished through the site admin panel.
Otsikko: Re: Change directory of where forum sits?
Kirjoitti: Illori - marraskuu 24, 2019, 05:10:17 AP
repair_settings.php does not exist in a normal install. you need to download the file from our site and upload it to your site, run it then delete it when done. if you had done that all your URL's and paths would have been corrected already.