We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Migrating Users to a new site How To with photos | Forum

Topic location: Forum home » Support » General Questions
Alex Thorn
Alex Thorn May 30 '16
i want to migrate all my users to a few new sites with all their posts, images,videos and everything, all their data complete.


what is the easiest way to do this


just the users and their data???


and yes i do have root access and cpanel

Thanks
Alex

dave Leader
dave May 30 '16
Export the DB from the old site

save a copy of your config.php from the old site and keep it off site

Save a copy of the ow_userfiles folder from the old site


Actually it might even be better to just save all the files because you will need the plugin folder as well


Install your new site under the new domain name


Save the config.php file from the new site keep it off site 




do not refresh the site pages while you do the next steps wait until you are done


turn on dev mode


now in your config.php file you want to change the url of the domain


also change the password salt to the one from your old config.php file that you saved from the old site. 

This will make the passwords match the old site so the users will have the same passwords. 


now replace the ow_userfiles folder with the one you saved


now drop all  your tables from the db so there are no tables in there at all. 


And then import your saved sql from the old site. 


Make sure you replace the plugin folder as well. 


Now you can refresh your pages and i think it should work... i have not tested this but it is from memory when i did it before. So i may have forgot something but i think i got it all down.  You may get some small issues that you will have to sort until it settles down in its new home. 

On a side note here - be sure you have permission from all the users (every one of them) before you go using their information on a new site.  


First it is a ethical violation doing so without their permission.

Second its a privacy violation because you are not using the information correctly.

Third its a TOS violation because they have not agreed to any TOS of the new site. 


Technically if they wanted to, they could sue you or your company for usage of data violations for each new site you create if you do not have their express written permission to use their data for that purpose.  Remember the data is not yours to do with what you want. The data belongs to them and is entirely theirs, you are just using it with their permission to execute your first site, not any others. 

 Now days people take this sort of thing very seriously so please be careful what actions you take without users permission. 


Dave 

The Forum post is edited by dave May 30 '16
Alex Thorn
Alex Thorn May 30 '16
it is the same domain name on the same server the old site was just in a sub-domain ie: live.iastra.net and i want to get rid of the sub-domain, so i just installed a new install of oxwall in the home directory, also to fix a few little bugs of the old site (with what i know now).


Couldn't i just export the SQL files using "my php admin" and just import each file in the new site using myPHP Admin (on the same server and the same domain), would i still have to change DB names and passwords???
thanksAlex

dave Leader
dave May 30 '16
OK now i get you...  Sorry if i misunderstood .. 


Yes, well almost,  if same domain name and same server just a new install you can just export the db in MyPHPAdmin from the old site and import it it to the new site.  


But remember that each install has its own pw salt key, you will need to replace that with the old key in the config file.  The easiest way is just replace the config file itself with the old config file. 


Then it should all work as long as you are not going from a really low version to the current version as there may be some issues getting it going. 



dave Leader
dave May 30 '16
Also if you had any special instructions in your old .htaccess file you will need to replace those as well.  I also assume you will be using the same db name and access as the old one.
The Forum post is edited by dave May 30 '16
Alex Thorn
Alex Thorn May 30 '16
so really i would just have to update the each of the mySQL files with the new DB name and DB password so i wouldn't have to even change the password salt in the config file.


now just to be sure, i only want the user accounts and user images.


so the only mySQL files i need to move are the ow-user and ow-userfiles or are there other folders to move??


dave Leader
dave May 30 '16
See now your making it complicated :) 


Updating the DB and updating the config as i understand it are two dif things. When you install the software fresh it creates a new config file with its own salt value.  The old install you had also had its own salt value.  If you do not use the same salt as part of the hash for the pw then the user will not be able to log in. 


So yes you will need to replace the config file with the old config file, importing to the db is different, the config file must have the same data as it did on the old site.  If you have changed the db login info or name, then just change that data in the config file and its done 


Yes there are other table and files possibly to consider but honestly i cannot remember which ones at this time, i will try to search the forum for you as i know someone has mentioned this before but it was a year ago or so and i dont remember the post value.   You should also try searching the forum and also search google for oxwall migrate site keywords i think and i think you may find something.   I think it was krunch one of our leaders who did that post.  

The Forum post is edited by dave May 30 '16
dave Leader
dave May 30 '16
actually there is this also which i forgot about lol 


https://wiki.oxwall.com/faq:migration




Alex Thorn
Alex Thorn May 30 '16
ah cool, i did search the forum before hand but migration, migratig brought up nothing.


let me check out the wiki


thanks, i think i got a pretty good idea what to do.

i appreciate it.


Cheers


Alex