vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=327340

move vbulletin 4.2.5 within public_html to public_html / example.com
by slash77xx
27 Jun 2019 12:46

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 27 Jun 2019 13:34

You have to follow various steps:
  1. Close the board & backup everything.
  2. Move all the files from /public_html to /public_html/sub_directory
  3. 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.
  4. Clear all browser cookie, cache and login into AdminCP of new site address.
  5. 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.
  6. Change Avatar/Profile Picture/Signature file path (AdminCP -> Avatars -> Attachment Storage Type).
  7. Clear system cache (AdminCP -> Maintenance -> Clear System Cache).
  8. Redirect all URL from old domain to new subdirectory (using .htaccess for example).
  9. Open the board.

final kaoss 27 Jun 2019 14:09

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 27 Jun 2019 21:09

Quote:

Originally Posted by BetoPho (Post 2599652)
You have to follow various steps:
  1. Close the board & backup everything.
  2. Move all the files from /public_html to /public_html/sub_directory
  3. 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.
  4. Clear all browser cookie, cache and login into AdminCP of new site address.
  5. 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.
  6. Change Avatar/Profile Picture/Signature file path (AdminCP -> Avatars -> Attachment Storage Type).
  7. Clear system cache (AdminCP -> Maintenance -> Clear System Cache).
  8. Redirect all URL from old domain to new subdirectory (using .htaccess for example).
  9. 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 27 Jun 2019 21:12

Quote:

Originally Posted by final kaoss (Post 2599653)
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 28 Jun 2019 13:10

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
The requested URL /attachment.php was not found on this server.
instead of :
https://www.example.com/forum/attachment.php?attachmentid=1192&d=1515157116
How can i fix this ?

thanks in advance

final kaoss 29 Jun 2019 16:12

Well I'm not sure what all you did but... over the past 18 month's I've went from;


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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 29 Jun 2019 16:41

Quote:

Originally Posted by slash77xx (Post 2599665)
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
The requested URL /attachment.php was not found on this server.
instead of :
https://www.example.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 01 Jul 2019 11:19

1 Attachment(s)
good afternoon .
my files are here:

root.jpg
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 01 Jul 2019 15:51

1 Attachment(s)
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://www.vbulletin.org/forum/atta...1&d=1561996300

slash77xx 03 Jul 2019 10:36

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


All times are GMT. The time now is 21:51.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.