[split from] Move to a new domain on same server

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
kooksee
Registered User
Posts: 1
Joined: Tue Sep 17, 2019 10:12 pm

[split from] Move to a new domain on same server

Post by kooksee » Wed Sep 18, 2019 12:31 pm

thecoalman wrote:
Mon Feb 05, 2018 10:11 pm
You do not have be dealing with config.php, you can do much of the groundwork beforehand and test for issues in advance if the old domain is to remain active.

Create a list of the exact steps you are going to take.
  1. Upgrade the existing forum first if possible.
  2. In your hosting control panel for the new domain set a htaccess password on the new location of the forum to keep the bots out and to prevent anyone from happening upon it.
  3. Install a fresh copy of 3.2.2 on the new domain.
  4. Copy attachments from the files folder and the avatar folder from the old domain to the new domain. If you have custom smilies or whatever you'll need to copy them over too.
  5. Backup your database on the old forum.
  6. Populate or restore the database on the new domain.
Run these SQL queries from phpMyadmin, note you need to edit these queries where it says "yournewdomain". Also note if you are mking changes from http to https these queries can all be done at this point.

Code: Select all

UPDATE `phpbb_config` SET `config_value` = '.yournewdomain.com' WHERE `phpbb_config`.`config_name` = 'cookie_domain';
UPDATE `phpbb_config` SET `config_value` = 'yournewdomain.com' WHERE `phpbb_config`.`config_name` = 'server_name';
Run this next query but only if the forum directory has changed names. eg olddomain.com/phpBB is now newdomain.com/forum. Note that "forum" in this query needs to be edited unless of course your new location is newdomain.com/forum ;)

Code: Select all

UPDATE `phpbb_config` SET `config_value` = '/forum' WHERE `phpbb_config`.`config_name` = 'script_path';
Login into the ACP and purge the cache, you may have to do this manually with FTP. You should be in business and you can test it to make sure there is no issues. Since you have populated the database that is not active you can take the time to test some MySQL commands for cleaning up other issues like doing a find and replace on internal links that have been posted. Again write all these steps and commands down.

Once you know you have solid process disable the forum on the old domain and follow the apllicable steps again. Enable the forum and remove the .htacces password so the public can get in. Upload whatever avatars or uploaded files were not included in the original transfer.

Last but not least you should set up a 301 redirect on the old domain to the new domain.
hello

very informative topic. I also need to move a forum to another domain (same host)
I did all the steps above but 6. is a little unclear to me.
what does actually mean?
also I run the SQL queries, I didn't get any error but nothing happens.
somehow the new forum doesn't connect to the data base. I tried some config.php changes but no luck,

Can somebody help?
thank you

Post Reply

Return to “[3.2.x] Support Forum”