+ Post New Thread
Results 1 to 2 of 2

Thread: How to move PHPBB forum from one domain to another domains subdomain

  1. #1
    Administrator
    Join Date
    Mar 2013
    Posts
    2,688

    How to move PHPBB forum from one domain to another domains subdomain

    How to move PHPBB forum from one domain to another domains subdomain - via Linux SSH command line

    I wanted to decrease my domain costs and decided to trash my forum domain and instead run the forum on another domain of mine as a subdomain.
    (myforumname.net -> myforumname.mynewdomain.com)

    Ho i did that:

    i have linux server, so i logged in via SSH.

    Backed up PHPBB forum files:

    cd /home/sourceusername/public_html

    tar cf filesbckp.tar

    backed-up PHPBB database:

    mysqldump -u mysql_username -pmysqlpassword mysql_databasename > databasebckp.sql

    changed domain name in database dump:

    sed -i 's|www.myforumname.net|myforumname.mynewdomain.com|g' ./databasebckp.sql
    sed -i 's|myforumname.net|myforumname.mynewdomain.com|g' ./databasebckp.sql

    then i logged in my hosting account where i want to host my forum from now on.

    - created subdomain myforumname.mynewdomain.com
    - created new database & username for the forum + attached username permissions to database

    then i can fill newly created database with data from my backup file:

    mysql -u newmysql_username -pnewmysqlpassword newmysqldatabase < ./databasebckp.sql

    go to newly created subdomain folder

    cd /home/targetusername/public_html/subdomains/myforumname/

    extract files backup located in old location to newlocation

    tar xf /home/sourceusername/public_html/filesbckp.tar -C /home/targetusername/public_html/subdomains/myforumname/

    set proper permissions to all extracted PHPBB files in newlocation:
    cd /home/targetusername/public_html/subdomains/myforumname/
    chown -R targetusername:targetusername *

    edit config file in new location (in /home/targetusername/public_html/subdomains/myforumname) to update with mysql database login credentials:
    vi config.php

    go to new location, subdomain folder and then into cache "folder":

    cd /home/targetusername/public_html/subdomains/myforumname/cache

    and delete all files except index.html and .htaccess

    then copy .htaccess file from old hosting to new hosting

    cp /home/sourceusername/public_html/.htaccess /home/targetusername/public_html/subdomains/myforumname/

    now your myforumname.mynewdomain.com should work ok, if it works, modiffy .htaccess file in your source directory to start pointing your old domain visitors to your new subdomain:

    vi /home/sourceusername/public_html/.htaccess

    add into it example:
    RewriteEngine On
    RewriteRule (.*) http://myforumname.mynewdomain.com/$1 [R=301,L]

    your old domain (myforumname.net) visitors should be now redirected to your new domain subdomain (myforumname.mynewdomain.com)

    make sure you dont forget to create mail boxes and cronjobs if you had any in your old hosting account

    it might be usefull to request URL change in Google Webmaster tools: https://support.google.com/webmasters/answer/83106

  2. #2


    Is this useful / helpfull? Yes | No
    very intrsting !!!!!!!!

+ Post New Thread

Similar Threads

  1. Replies: 1
    Last Post: 12-07-2021, 05:45 AM
  2. Replies: 0
    Last Post: 01-12-2015, 04:22 PM
  3. Replies: 0
    Last Post: 12-16-2014, 11:40 AM
  4. Unable to login to phpBB forum
    By webc in forum PHP, MySQL Forum
    Replies: 1
    Last Post: 03-23-2014, 03:15 PM
  5. Replies: 0
    Last Post: 11-13-2013, 01:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 Protected by : ZB BLOCK  &  StopForumSpam