• While creating requests or asking for support in the existing XenForo threads please maintain XenForo support policy strictly.

  • You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Moving Xenforo from one domain to another - and changing hosts too

kikirikimiki

Active member
Jul 1, 2020
208
223
43
Hello Xenforo users and masters (deep bow). I have come to you in hours of wondering in darkness - as the friggin database is not in plain text and moving this has turned into a nightmare and I dunno which is which anymore. (deep breath....)
I am moving the forum from a host that's been the target of too many ddos attacks o a more established on that can take a beating. And changing the domain in the process. This one has a better sounding to it. Anyhow - what is the procedure that one should follow? Export does not seem available in the standard install, the few procedure description I have found are like that drawing instruction of a bird -draw a point - another point - now two circles, that's good - now the rest of the friggin bird!
Is there a plugin to export it ? Is there one to import it ? can I dare hope to something similar to All-In-One WP Migration ? No ?
Thank you for pointing me towards the light.
Have a good one !
 
  • Like
Reactions: Nabeel
Hi - yes.

I have exported a tar.gz backup of my database on the old domain using the BACKUP function of Cpanel - a normal sql dump didn't work - replaced any reference to the olddomain.com in the sql with newdomain.com - repacked as tar.gz and used the restore in the BACKUP function of the Cpanel on the new host. I kept it quite straight forward with installing everything within the root folder and - it worked. It is kinda of a half baked way - meaning this is not how they recommend doing it - but than again their method does not work at all, so ... that is that.
It goes without saying I hope that you'll need all the ftp content copied over the new host within the designated folder for your newdomain.com. And you will need to modify the config file to reflect the details of the new sql db user and pass.

I really hope this helps - if you have any questions - feel free. Peace!
 
  • Like
Reactions: Nabeel
Hello Xenforo users and masters (deep bow). I have come to you in hours of wondering in darkness - as the friggin database is not in plain text and moving this has turned into a nightmare and I dunno which is which anymore. (deep breath....)
I am moving the forum from a host that's been the target of too many ddos attacks o a more established on that can take a beating. And changing the domain in the process. This one has a better sounding to it. Anyhow - what is the procedure that one should follow? Export does not seem available in the standard install, the few procedure description I have found are like that drawing instruction of a bird -draw a point - another point - now two circles, that's good - now the rest of the friggin bird!
Is there a plugin to export it ? Is there one to import it ? can I dare hope to something similar to All-In-One WP Migration ? No ?
Thank you for pointing me towards the light.
Have a good one !
Hi!

I am not a master. I am still learning. But I will try my best to explain the whole process of transferring a forum from one host to another.
Moving a PHP script with a database from one host to another is pretty easy and almost same for every such script. You have to follow some simple steps. Hope you know how to change the Nameserver, so I am not explaining that. If you don't know in case, feel free to ask. Not knowing is not a shame, but hiding it and making mistakes, is a shame. Now I am explaining below the whole process of taking backup and transferring:
  1. Go to cPanel > Files > File manager (in your old host)
  2. Your domain root folder 'public_html' will be on the right panel in your 'File Manager' page (assuming that 'public_html' is your root folder, otherwise it will be a folder with your domain name like abc.xyz if it is an add-on domain)
  3. Select 'public_html' from the right pane, then click on 'Compress' (you can also right click on the folder and select 'Compress')
  4. Type in the path to compress or it will be compressed inside 'public_html' and choose the 'Compression Type'. 'Zip Archive' will be safest. Then click 'Compress' button.
  5. You can download the Zip file either by an FTP client like Filezilla or you can select the Zip file and click on 'Download' from the menu bar.
  6. Close 'File Manager' tab (your work here is done for now) and go to Databases > phpMyAdmin (assuming you are using MySQL / MySQLi instead of PostgreSQL)
  7. In the phpMyAdmin page select your database from the left pane.
  8. On selecting (clicking) on your database name on the left pane, the right pane will show the tables in it.
  9. Click on the 'Export' tab on the top of the right pane.
  10. Select 'Custom' under Export Method.
  11. Scroll down at the bottom and click on 'Go' button (DO NOT DO ANYTHING ELSE IF YOU DON'T KNOW WHAT YOU ARE DOING).
  12. Save the file where you want in your local HDD. A '.sql' file will be downloaded.
  13. Your Backup process is complete.
  14. Now go to the cPanel > Database > phpMyAdmin of your New Host (assuming you have created a database already. If not, feel free to ask me about the process).
  15. Now select the new database from the left pane and click on 'Import' tab on the menu bar, the click on 'Browse' button and sect your downloaded database from your local HDD and click on 'open' button.
  16. Scroll down at the bottom of the page and click on 'Go' button. It will take a while depending on the size of the database. Be patient and wait. DO NOT REFRESH THE PAGE STILL IT COMPLETE.
  17. On successful upload of the database, a message will be shown like " xxxx number of tables created ..blah.. blah... blah..".
  18. Now, in two ways you can upload the Zip file (your backup file) to the new server: 1) You can extract the Zip file in your local HDD and upload them to the new server's 'public_html' folder (assuming it is the root folder of your forum) Or go to cPanel > Files > File Manager. Select 'public_html' or your forums root folder from the left pane of the page and click on 'Upload'. The page which will open is pretty self-explanatory. After 100% completion, click on 'Go back' link.
  19. Now, if you adopt way number 1), then go to the folder 'src' and open the 'config.php' with an editor like Notepad++.
  20. Change the 'host', 'username', 'password' and 'dbname' with those of your new host and then upload all the files inside your extracted folder to the 'public_html' folder of the new host. This is the best process. If you opt 2), then you have to upload the Zip file through the cPanel > Files > File Manager and then the process pretty much same as download, except this time you choose 'Upload' from the menu bar. Then you have to extract, edit the file and etc. etc. It's a little bit lengthy process and with this process, your Zip file may get corrupt. So, using a FTP client like Filezilla is your best choice. Before starting to upload using Filezilla, go to Transfer > Transfer Type and select 'Binary'.
  21. After completion of the transfer, open 'your-forum-name.xyz' in a new tab.
  22. Your forum in your new host should open as it was before.
  23. The process is complete.

Hope this will help.
 
Last edited:
  • Like
Reactions: kikirikimiki
Hi!
Thank you for your in-depth reply, your step by step guide makes it really easy to change hosts. But not domains.
My main challenge here was moving not only the content and the database to a new host but changing the domain name too.
To that extent I migrated the content as described above, used the back-up function in cPanel to export the current db, edited the SQL to modify the olddomainname.com to newdomainname.com - tarred it back and used the import function in the backup tool in cPanel to import the modified database at the new host. Exporting the db from mySQL does not work the same as using the export function in cPanel - so you won't be able to modify it unless you tweak your export I guess.
Once that done, I modified the config file to reflect the new db coordinates (name, user, pass) and it was done.

Between your step-by-step guide and my description I guess we have a working method for anyone out there who wants to do the same.

Peace!
 
  • Like
Reactions: DarKMaSk
Hi!
Thank you for your in-depth reply, your step by step guide makes it really easy to change hosts. But not domains.
My main challenge here was moving not only the content and the database to a new host but changing the domain name too.
To that extent I migrated the content as described above, used the back-up function in cPanel to export the current db, edited the SQL to modify the olddomainname.com to newdomainname.com - tarred it back and used the import function in the backup tool in cPanel to import the modified database at the new host. Exporting the db from mySQL does not work the same as using the export function in cPanel - so you won't be able to modify it unless you tweak your export I guess.
Once that done, I modified the config file to reflect the new db coordinates (name, user, pass) and it was done.

Between your step-by-step guide and my description I guess we have a working method for anyone out there who wants to do the same.

Peace!
Changing the domain nameserver is also very easy to do. Assuming your domain is hosted to a seperate host from your server host, go to the dashboard of your domain host. Select your domain and then 'Manage' or 'Manage Name server' or 'Manage DNS', whatever option is there. There change the new nameservers like ns1.abc.xyz, ns2.abc.xyz etc. Change all the nameservers and click on apply. It will take 24 to 72 hours to propagate. Once it will propagate, all will run smoothly.

Note: If you can post some screenshots of the domain service page of your domain host, it will be more easy to explain.
 
Last edited:
Changing the domain nameserver is also very easy to do. Assuming your domain is hosted to a seperate host from your server host. Go to the dashboard of your domain host. Select your domain and the 'Manage' or 'Manage Name server' or 'Manage DNS'. There change the new nameservers like ns1.abc.xyz, ns2.abc.xyz etc. Change all the nameservers and click on apply. It will take 24 to 72 hours to propagate. Once it will propagate, all will run smoothly.
Yeah but actually no. Participating in this discussions means that you read / hear the other participants - not just react after their first words.
Lemme lay on the scenario that you seemingly did not grasp :
What we have : Xenforo installed on server A using domain name A.com
What we want to achieve : Same Xenforo forum with all its contents on server B using domain name B.com
Dns management, NS config and all that domain jaszz does not come into play at all given that we are dealing with two separate domain names - A.com and B.com. For simplicity sake let's suppose each cPanel is configured to host it's own domain.
The undocumented part was the changing the name of the domain that holds your xenforo. I'll give you an example - let's say Babak was forced to move from babia.to to babiatofamily.tk because reasons. And move the server to a offshore host. That is the gist of it.
Editing NSs and domain names is somehow not directly related to the issue of changing the DOMAIN NAME on which Xenforo functions.

Peace!
 
Yeah but actually no. Participating in this discussions means that you read / hear the other participants - not just react after their first words.
Lemme lay on the scenario that you seemingly did not grasp :
What we have : Xenforo installed on server A using domain name A.com
What we want to achieve : Same Xenforo forum with all its contents on server B using domain name B.com
Dns management, NS config and all that domain jaszz does not come into play at all given that we are dealing with two separate domain names - A.com and B.com. For simplicity sake let's suppose each cPanel is configured to host it's own domain.
The undocumented part was the changing the name of the domain that holds your xenforo. I'll give you an example - let's say Babak was forced to move from babia.to to babiatofamily.tk because reasons. And move the server to a offshore host. That is the gist of it.
Editing NSs and domain names is somehow not directly related to the issue of changing the DOMAIN NAME on which Xenforo functions.

Peace!
My apology that I can't understand what your main problem is. I may be a dumb, but what I understood that you want to buy a new domain and transfer the current Xenforo forum with its all settings, posts, media... everything under the new domain name, which I also have done before after lost my forums original domain name due to a DDoS attack. I had to change both the domain name and the server host at the same time. So, what I did, I bought a new domain and bought a new server space, both from different host. Changed the nameserver according to the new host and upload the old backed up files and database to the new server, edited the config, waited for almost 72 hours and the forum was up. If this seems that I have again failed to understand your problem, then after spending almost 9 years in this line of work, I may be not qualified enough to answer your question. If you think that to achieve your goal, "Same Xenforo forum with all its contents on server B using domain name B.com", "Dns management, NS config and all that domain jaszz does not come into play at all", then I do not know any other way and you are much more knowledgeable. Better you hire some 'Specialist' who can do this without go through those "domain jazz" or you can ask @Babak or @CyberDeviL about their opinion. I have tagged them in this conversation in hope that they can help you and I may learn some 'other way' to achieve this.

“A question that sometimes drives me hazy: am I or are the others crazy?”
― Albert Einstein

🙏
 
Use a service like Cloudflare for anti-ddos, to hide the main IP and handle dns entries then just restore the back up to a new box. If your forum is for something breaks terms of services then go for a Russian anti-ddos provider who maybe less concerned about content.
 
In my post from the 5th of March I have clearly stated that I have managed to change both : host and domain and described the method.
Following the very detailed step-by-step on your initial response one would be able to move the forum from host A to host B but not to a new domain. That procedure it is not covered. As a result the whole A.com would still resolve to the A host and the whole content moved to host B won't be responding to B.com as the friggin' forum settings would be still instructing the script that it's home address is A.com.So your site will load (or try to) from there.
As I said - excellent step by step guide but just half of the job.
Getting back to reading the whole message to which you are responding to - your second answer was addressing nameservers : " Changing the domain nameserver is also very easy to do." That was never part of the conversation. Using different registars and centralizing the DNS management to CloudFlare is maybe the standard nowadays - at least it should be for your run-of-the-mill everyday installs - so why assume less unless specified?
And the bit where I should hire a specialist (after I have specified twice that I have solved it - and detailed the method how to tell Xenforo what it's new domain is) tells me that your patience to read the whole bit and understanding it is not all there.

I do get that you are coming from a good place with good intentions for which we all thank you again. Your guide is sure to be useful to someone.

Peace!
 
  • Like
Reactions: DarKMaSk
My apology if I sounded rude which was not my intention. You have rightly said that I didn't read your second post. If I would seen that, I would not write that lengthy, time consuming step-by-step process. Now, I would like to share some information which I have learnt through the time. The concept of Internet is based on our real life. If I build a home, then I have to register it with municipality or city authority, who allots a number to my home so that people can reach using that address and they put it in a book which is called a 'register' where all the addresses are listed. In case of Internet, this 'register' is called as DNS (Domain Name System), the 'Nameserver' is the address of the Physical Web Server i.e. the plot on which your home is built and the web address e.g. 'A.com' is the postal address of your 'home' i.e. your forum's address. So just like in our real life, without a Nameserver, it would have been almost impossible to access a website, even if they exist.

Every valid Name Server is associated with the IP address of that server. So, this is how it all works:
  1. The user enters a website address (example: google.com) in the browser.
  2. The request is sent to the respective domain’s Nameserver by the browser.
  3. The browser receives back an IP address from the Nameserver.
  4. Another request is sent by the browser to the IP address supplied by the Name Server
  5. The server associated with that IP address receives the request
  6. If the files and other details are configured correctly the browser will display the website content on the browser.
  7. If the files are not found or there are any other misconfigurations it will return an error to the browser.
The above process takes just a few seconds and in some cases not even a second to complete.

So, again what is the difference between a Nameserver and a DNS?

A DNS is the Directory of the Internet, where it searches for the IP address associated with the specific domain name to deliver various web-based services. Whereas a Nameserver provides the specific IP address of particular services associated with that domain name. Simply speaking, the DNS is used to identify the specific Nameserver, which in turn provides the IP address of web hosting server.

Now, whenever you purchase a hosting package, the provider will provide you with a set of Nameservers, a Primary Nameserver and a Secondary Nameserver. First you have to delete the nameservers from your old domain host's domain management system. Then you have to wait for few hours for the change takes place. Then you have to copy the Nameservers of your server and enter it into the domain management interface which you will find on the dashboard of your 'B.com' domain host. Once you have changed, it might take a few hours to completely propagate the updated nameservers. And after that the address of your existing forum will change from 'A.com' to 'B.com'.

I don't know any other way to change a domain address of a website from 'A.com' to 'B.com'. Sorry.

And I forgot to mention, Cloudflare is a totally different concept.
 
Last edited:
Real life scenario - this way you'll get a better view on what I meant:
Started a Xenforo for a parent community in a school. The domain name wasn't the best choice so after a while I decided to change it - and whilst doing so to change the host too. So uglyname.com (A.com) become obsolete and prettyname.com (B.com) became the new address of the community forum. Uglyname.com (A.com) was not supposed to be used anymore.
Once all content moved to prettyname.com (B.com) onto the new server and them databases installed and connected to the script if you were to try accessing B.com on the new host the configuration settings in Xenforo would redirect to A.com according to the data included in the database I have imported from the old site. Without modifying those settings there was no way to use the old content on the new domain. And the only way I was able to address that was to export it from within cPane, edit it, archive and import it in the new cPanel - and off course connect the script to the newly imported db.

On the DNS site of things - both domains were registered with internet.bs - the NS were set for Cloudflare and the DNS for A.com were pointing towards 11.22.44.55 and for B.com towards 22.33.44.55 from the get go. No changes there were necessary.


Peace!
 
I have asked someone with more advanced knowledge on Xenforo to look after your problem. Let's see.
 
Change the urls in the database to the new one. That should solve the problem. Use something like phpmyadmin etc.
 
  • Like
Reactions: DarKMaSk
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock