Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2019, 10:46 AM
slash77xx's Avatar
slash77xx slash77xx is offline
 
Join Date: Dec 2015
Location: Spain
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default move vbulletin 4.2.5 within public_html to public_html / example.com

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:
Reply With Quote
  #2  
Old 06-27-2019, 11:34 AM
BetoPho BetoPho is offline
 
Join Date: Nov 2014
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
4 благодарности(ей) от:
iA1, In Omnibus, slash77xx, TheLastSuperman
  #3  
Old 06-27-2019, 12:09 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
3 благодарности(ей) от:
BetoPho, In Omnibus, slash77xx
  #4  
Old 06-27-2019, 07:09 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BetoPho View Post
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.
Reply With Quote
3 благодарности(ей) от:
BetoPho, iA1, slash77xx
  #5  
Old 06-27-2019, 07:12 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by final kaoss View Post
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.
Reply With Quote
  #6  
Old 06-28-2019, 11:10 AM
slash77xx's Avatar
slash77xx slash77xx is offline
 
Join Date: Dec 2015
Location: Spain
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 06-29-2019, 02:12 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Code:
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.
Reply With Quote
  #8  
Old 06-29-2019, 02:41 PM
BetoPho BetoPho is offline
 
Join Date: Nov 2014
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by slash77xx View Post
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.
Reply With Quote
  #9  
Old 07-01-2019, 09:19 AM
slash77xx's Avatar
slash77xx slash77xx is offline
 
Join Date: Dec 2015
Location: Spain
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Attached Images
File Type: jpg root.jpg (39.5 KB, 0 views)
Reply With Quote
  #10  
Old 07-01-2019, 01:51 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.


Attached Images
File Type: jpg root.jpg (45.3 KB, 0 views)
Reply With Quote
Благодарность от:
slash77xx
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10698 seconds
  • Memory Usage 2,295KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (11)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete