1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

About to migrate from phpBB3

Discussion in 'Installation, Upgrade, and Import Support' started by Gazhyde, Apr 11, 2013.

  1. Gazhyde

    Gazhyde Well-Known Member

    Hi,

    Just bought a license and really enjoying it so far. I'm looking to go live this weekend by importing the database from my current phpBB installation (already done one test import which went 100% as far as I can see). I've had a really good look through this forum the last few weeks but still have some questions...

    My phpBB is currently installed in /forum and my XF installed in /community on the same hosting account. What I want to to is change XF over to the /forum folder.

    I'm assuming that I rename the current forum folder, then I can change the XF over to this. Think I have found a thread on here which covers this change, and I'm hoping is straight forward!

    The next thing is the htaccess redirects. I've not found a definitive thread which explains this specifically for phpBB - or one that I understand anyway ;) Can someone post a link they know a good one to follow.

    Hope that all makes sense, and thanks in advance. I'm just a little nervous on changing over....

    Gary
     
  2. Sheratan

    Sheratan Well-Known Member

    Gazhyde likes this.
  3. Martok

    Martok Well-Known Member

    Your changeover should be fine, I moved from phpBB3 to Xenforo just 3 weeks ago. :D

    I went for /community as I fancied the change, plus we were using a WordPress & phpBB3 combination which were in different folders (/home and /forums). I just used .htaccess to redirect users to the new site.

    If you've not done so already, do think about the smileys you'll use on the new site. I didn't want to take the phpBB3 set with me and I didn't fancy using the default Xenforo ones (sorry!) plus there weren't enough of these anyway. I therefore got a bunch of new ones from Kolobok which was recommended to me.

    There's many add-ons I would recommend but one you will find useful as an admin is Post Content Find / Replace. I used it to replace some smiley codes, convert the youtube tags to media tags and replace the URL links throughout the site (we'd done a hack on phpBB3 to open links in a new window and it left html code lying around after migration).

    I hope the move goes well and you won't regret it, Xenforo is much better than phpBB3 IMO. :D
     
    Gazhyde likes this.
  4. MattW

    MattW Well-Known Member

    I also moved from phpBB3 (but over 12 months ago now). Brogan is also a previous phpBB user, and he helped me out a lot when I first moved over.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, I converted via vB back in January 2011, so we lost passwords and weren't able to put redirects in place.

    We originally had the forum in the root, then moved it to /forum/ while using phpBB.
    When we converted I decided I liked the /community/ idea so went with that.

    I had to tidy up all the custom BB Code we were using but a few SQL queries and the post content replace tool soon sorted that.

    The difference is like night and day as far as usability is concerned.
    Our posting rate increased massively, helped in no small part by the likes and alerts.
     
    Gazhyde likes this.
  6. Gazhyde

    Gazhyde Well-Known Member

    Yay! Sooo many answers and so much information in such a short time. Doesn't look like I'll be leaving the keyboard in the near future... :D

    With regards to the .htaccess's supplied above, does it make any difference if I turn on the SEO url feature (which is something I'm really keen to do). It says in the ACP that the .htaccess needs to be in place, but doesn't mention what exactly.

    I personally agree that domain.com/community is a much nicer option, as that's what we are trying to build - just need to convince my forum partner...
     
  7. MattW

    MattW Well-Known Member

    Friendly URLs should work if you have mod_rewrite installed.

    My site is in the /forum directory, and below is my .htaccess section to get all the old links to redirect:
    Code:
    RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
            RewriteRule ^viewtopic\.php$ /forum/threads/%2? [L,R=301,NC]
            RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
            RewriteRule ^(viewforum\.php|viewtopic\.php)$ /forum/forums/%1? [L,R=301,NC]
            RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
            RewriteRule ^viewtopic\.php$ /forum/posts/%2? [L,R=301,NC]
            RewriteCond %{REQUEST_FILENAME} -f [OR]
            RewriteCond %{REQUEST_FILENAME} -l [OR]
            RewriteCond %{REQUEST_FILENAME} -d
            RewriteRule ^.*$ - [NC,L]
            RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
            RewriteRule ^.*$ index.php [NC,L]
     
    Gazhyde likes this.
  8. Morgain

    Morgain Well-Known Member

    Gazhyde and Martok nothing for me to add as the help you're getting is great so I'll just say croeso and welcome.
    See you around.
     
    Gazhyde likes this.
  9. Gazhyde

    Gazhyde Well-Known Member

    Just ran another test import and got this... ran through fine the first time a few days ago...

    Server Error
    Mysqli statement execute error : Duplicate entry '2' for key 'PRIMARY'
    1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
    2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
    4. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1591
    5. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1580
    6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1381
    7. XenForo_DataWriter->save() in XenForo/Model/Import.php at line 580
    8. XenForo_Model_Import->_importData() in XenForo/Model/Import.php at line 1556
    9. XenForo_Model_Import->importPost() in XenForo/Importer/PhpBb3.php at line 1862
    10. XenForo_Importer_PhpBb3->stepThreads() in XenForo/Importer/Abstract.php at line 77
    11. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 180
    12. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 232
    13. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 175
    14. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 310
    15. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    16. XenForo_FrontController->run() in /home/zroadstr/public_html/community/admin.php at line 13
     
  10. Andrej

    Andrej Well-Known Member

    Gazhyde likes this.
  11. Gazhyde

    Gazhyde Well-Known Member

  12. Gazhyde

    Gazhyde Well-Known Member

    Thanks Andrej,

    I did create a user so I could take some screen shots. Can I just delete that user from Xenforo and then retry the import? Or has the database got to be completely clean?

    Thanks, Gary
     
  13. Andrej

    Andrej Well-Known Member

    Yes, just try to delete that user. :) According to this post it should work.

    If that fails, simply add /install to your forum URL and there is a link to do a fresh install.
     
  14. Gazhyde

    Gazhyde Well-Known Member

    Re-imported a clean database from before I added the user, and that seems to allow the import to complete. I have a few issues to sort now.

    1> A lot of our Youtube videos were embedded using [Youtube] tags and just the video code. I guess I'm going to need to trawl through and find these and edit accordingly?
    Code:
    [youtube]abcdefghi[/youtube]
    2> Having done a full import, I can drop the database tables and re-import my "clean" database back in. Do I need to delete the Avatars and Attachments which imported, or do I just skip them when I run the final import?

    Thanks to everyone for your help so far!
     
  15. MattW

    MattW Well-Known Member

  16. Brogan

    Brogan XenForo Moderator Staff Member

    There's an even easier way if all embeds are identical:

    Code:
    UPDATE xf_post SET message = REPLACE(message, '[youtube]', '[media=youtube]');
    UPDATE xf_post SET message = REPLACE(message, '[/youtube]', '[/media]');
    
     
    MattW likes this.
  17. Gazhyde

    Gazhyde Well-Known Member

    Thanks Matt, but I don't think that will work in this case.

    There is no URL, just the open and close tags and the 8 or so digit video code. See image for better idea!

    youtubetags.png

    It will of course work fine on those who pasted the complete Youtube URL to the video.
     
  18. MattW

    MattW Well-Known Member

    replace.PNG
     
    Tracy Perry and Brogan like this.
  19. Gazhyde

    Gazhyde Well-Known Member

    I take my hat off to you. I *assumed* it would need to be the full http://youtube.com/faohfhrfruh address to display the video.

    Thanks for persevering through my stupidity!
     
    MattW likes this.
  20. Gazhyde

    Gazhyde Well-Known Member

    Ok, next question.

    I currently have my install of XF in domain.com/community but I need to rename this to domain.com/forum before or after importing my phpBB database.

    Is it a case of changing the Board URL setting and renaming the folder, or is it more involved than this?

    Cheers

     

Share This Page