PDA

View Full Version : move vbulletin 4.2.5 within public_html to public_html / example.com


slash77xx
06-27-2019, 10:46 AM
good afternoon,
I would like to move vbulletin 4.2.5 inside public_html to public_html / example.com <- (new folder) what steps do I have to follow? Will my files or styles (images) and url be affected?
I am forced to make these changes because I have to add more domains and I do not want them to be mixed in the directory.
Thanks in advance :up:

BetoPho
06-27-2019, 11:34 AM
You have to follow various steps:

Close the board & backup everything.
Move all the files from /public_html to /public_html/sub_directory
Change the values in 'setting' table:

Change the board URL in the database to '(your_domain)/sub_directory' by adjusting the 'bburl' value.
Change the Cookie path to '/sub_directory' or '/' by adjusting the 'cookiepath' value. Safest and easiest value is '/', except when you're using some kind of SSO integration with your site in the same domain.

Clear all browser cookie, cache and login into AdminCP of new site address.
Change Attachment file paths in case you use File System to store attachment (AdminCP -> Attachments -> Attachment Storage Type).
In case you use Database to store attachments, this step is not needed.
Change Avatar/Profile Picture/Signature file path (AdminCP -> Avatars -> Attachment Storage Type).
Clear system cache (AdminCP -> Maintenance -> Clear System Cache).
Redirect all URL from old domain to new subdirectory (using .htaccess for example).
Open the board.

final kaoss
06-27-2019, 12:09 PM
What I did with one of my databases was just did a full search & replace like this.

http://www.mysite.com/

http://www.mysite.com/forum/

Then just upload your forum contents to the new directory, import the new mysql db and that's about it.

TheLastSuperman
06-27-2019, 07:09 PM
You have to follow various steps:

Close the board & backup everything.
Move all the files from /public_html to /public_html/sub_directory
Change the values in 'setting' table:

Change the board URL in the database to '(your_domain)/sub_directory' by adjusting the 'bburl' value.
Change the Cookie path to '/sub_directory' or '/' by adjusting the 'cookiepath' value. Safest and easiest value is '/', except when you're using some kind of SSO integration with your site in the same domain.

Clear all browser cookie, cache and login into AdminCP of new site address.
Change Attachment file paths in case you use File System to store attachment (AdminCP -> Attachments -> Attachment Storage Type).
In case you use Database to store attachments, this step is not needed.
Change Avatar/Profile Picture/Signature file path (AdminCP -> Avatars -> Attachment Storage Type).
Clear system cache (AdminCP -> Maintenance -> Clear System Cache).
Redirect all URL from old domain to new subdirectory (using .htaccess for example).
Open the board.


Great info, I would like to extend this to include:


Change the bburl value in the datastore table if you experience any login issues after the above.


For those testing a migration to a new host:
If you haven't finalized changes i.e. testing via ip or the new url beforehand, also change the cookie prefix in config.php on the newly copied site i.e. at the new example.com so when you login to each site and traverse the admincp and compare the sites you're not logged-out between the two.

TheLastSuperman
06-27-2019, 07:12 PM
What I did with one of my databases was just did a full search & replace like this.

http://www.mysite.com/

http://www.mysite.com/forum/

Then just upload your forum contents to the new directory, import the new mysql db and that's about it.

This will ensure all old links in posts are updated. Be sure to also check for just mysite.com in case any posts had url's w/o the www prefix. The same would apply if you had SSL enabled but allowed viewing of http version as well i.e. also search for http://www.mysite.com and https://mysite.com and replace accordingly.

slash77xx
06-28-2019, 11:10 AM
good afternoon ,
I followed the steps mentioned but I have a problem with the Attach files it appears like this:
https://www.example.com/attachment.php?attachmentid=1192&d=1515157116 (https://www.electromecanica-foro.com/attachment.php?attachmentid=1192&d=1515157116)
The requested URL /attachment.php was not found on this server.
instead of :
https://www.example.com/ (https://www.electromecanica-foro.com/)forum/attachment.php?attachmentid=1192&d=1515157116
How can i fix this ?

thanks in advance

final kaoss
06-29-2019, 02:12 PM
Well I'm not sure what all you did but... over the past 18 month's I've went from;

example.com/forum
to
example.com/
to
newdomain.com/forum


And wound up with the majority of attachments still working. But yeah aside from the mass search & replace that I mentioned, you shouldn't have touched any other settings, as that mass edit would've changed them all to where they needed to be. So my guess is that you chose to put files in the database instead of storing them locally as files.

BetoPho
06-29-2019, 02:41 PM
good afternoon ,
I followed the steps mentioned but I have a problem with the Attach files it appears like this:
https://www.example.com/attachment.php?attachmentid=1192&d=1515157116 (https://www.electromecanica-foro.com/attachment.php?attachmentid=1192&d=1515157116)
The requested URL /attachment.php was not found on this server.
instead of :
https://www.example.com/ (https://www.electromecanica-foro.com/)forum/attachment.php?attachmentid=1192&d=1515157116
How can i fix this ?

thanks in advance

Can you check the template codes of the pages where the links are displaying incorrectly? It could be because of '/attachment.php' instead of 'attachment.php' somewhere, causing it always linking to the domain root folder.

slash77xx
07-01-2019, 09:19 AM
good afternoon .
my files are here:

root.jpg (https://vborg.vbsupport.ru/attachment.php?attachmentid=157412&stc=1&d=1561979579)
my problem is that as I mentioned the URL address is not rewritten and is not correct therefore I get errors when trying to upload or download or simply see the files, because it does not find them, not to mention that there are other add-ons such as chat box and the statistics are loaded without showing any results.
I think some step is missing
thank you in advance and have a nice day

Seven Skins
07-01-2019, 01:51 PM
1 - Your forum folder must be inside the public_html folder else public cannot use these file hence public cannot upload download attachments.

2 - Avoid Spaces in Your Filenames

3 - Use lower case in file and folder names.

4 - Your forum url in the adminCP must be changed to new location of your forum.


https://vborg.vbsupport.ru/attachment.php?attachmentid=157413&stc=1&d=1561996300

slash77xx
07-03-2019, 08:36 AM
good afternoon
Well try in several ways but without a satisfactory result, I will try to see a solution on the weekend, which more or less is where the problem of the attachments may be.
thank you all for your time