• Hello

    I have a problem when migration of old database to our new wordpress site

    The main problem is both databases have different structure and we asked database administrator and he replayed by this and I need to see as it effective solution or no:

    I took a quick look at the data and see that data structure is different on both. Here is the user data on both:

    /* Old data */;
    INSERT INTOmembers(ID,uname,passwd,email,name,code,active,activeemail,reg_date,mode,pic,mobile,m_date,status,notes,country,city,type_login,b_date,qualification,specialization,faculty,year,job_name,points,maillist,end_period`)
    VALUES
    (1,’[email protected]’,’5eeb2fbddadc5677663754b71337c174′,’[email protected]’,’????? ??????’,’ – ‘,’YES’,’YES’,’2012-05-12′,’admin’,’1470296496.jpg’,’966500000000′,’1388607305′,NULL,NULL,’1′,’2′,NULL,’08/05/2016′,”,’?????’,”,”,”,0,NULL,NULL),
    (2,’[email protected]’,’5eeb2fbddadc5677663754b71337c174′,’[email protected]’,’???? ??????’,NULL,’YES’,’YES’,’2016-03-21′,’admin’,”,”,NULL,NULL,NULL,”,’1′,NULL,”,”,”,”,”,’?????’,390,NULL,’1513641600′),
    (8,’[email protected]’,’5eeb2fbddadc5677663754b71337c174′,’[email protected]’,’ABC’,NULL,’YES’,’YES’,’2016-08-31′,’member’,”,’966500000000′,’1472633390′,NULL,NULL,’1′,’510′,’normal’,”,”,’???? ????????’,”,”,’?????’,0,”,’1473206400′),
    (9,’[email protected]’,’5eeb2fbddadc5677663754b71337c174′,’[email protected]’,’????? ??????? ???????’,NULL,’YES’,’YES’,’2016-08-31′,’member’,”,’966500000000′,’1472642753′,NULL,NULL,’1′,’510′,’normal’,”,”,’????? ??????’,”,”,’??????’,0,”,’1473206400′),
    (10,’[email protected]’,’5eeb2fbddadc5677663754b71337c174′,’[email protected]’,’PGNAO Co. Ltd’,NULL,’YES’,’YES’,’2016-08-31′,’member’,”,’966500000000′,’1472642832′,NULL,NULL,’1′,’491′,’normal’,”,’???? ????? ???????’,’????? ??????’,”,”,’??????’,0,”,’1473206400′),
    (11,’[email protected]’,’5eeb2fbddadc5677663754b71337c174′,’[email protected]’,’???? ???????? ????????’,NULL,’YES’,’YES’,’2016-08-31′,’member’,”,’966500000000′,’1472642921′,NULL,NULL,’1′,’510′,’normal’,”,’???? ??????’,’?????’,”,”,’??????’,0,”,’1473206400′),
    (12,’[email protected]’,’5eeb2fbddadc5677663754b71337c174′,’[email protected]’,’?????’,NULL,’YES’,’YES’,’2016-08-31′,’member’,”,’966500000000′,’1472643684′,NULL,NULL,’1′,’510′,’normal’,”,’???? ??????’,’?????? ??????? ?????? ??????????? ?????????’,”,”,’??????’,0,”,NULL);`

    /* New data less fields */;
    INSERT INTOwp_users(ID,user_login,user_pass,user_nicename,user_email,user_url,user_registered,user_activation_key,user_status,display_name`)
    VALUES
    (3,’Aimee’,’$P$Ba5n/2HCxYN1dEn99ACVJpqSErrxJ71′,’aimee’,’[email protected]’,”,’2017-02-08 06:57:53′,”,0,’Echo Social’),
    (4,’annettecox’,’$P$BJswQURi/62vd1y7nNTRuzr/Bh5kgh/’,’annettecox’,’[email protected]’,”,’2017-02-08 06:57:53′,”,0,’Annette Cox’),
    (5,’annfuller’,’$P$B52ZD6lrKw2pC9HS2MOfRNZv9fAzoM/’,’annfuller’,’[email protected]’,”,’2017-02-08 06:57:53′,”,0,’Ann Fuller’),
    (6,’barryburns’,’$P$BE3fzFpnl7W8XT3TCxNjFa1WSZq2WU/’,’barryburns’,’[email protected]’,”,’2017-02-08 06:57:54′,”,0,’Barry Burns’),
    (7,’aldossab’,’$P$BUuyFYYnLS0rlM0a2CJlTps6C8wMBV.’,’aldossab’,’[email protected]’,”,’2017-03-06 10:01:45′,”,1,’aldossab’),
    (8,’test12′,’$P$BloizNv1dsGPhCRDzK/aEsJHUnLj6i/’,’test12′,’[email protected]’,”,’2017-03-07 14:26:48′,”,1,’test12′),
    (9,’employer1′,’$P$BFJzDPHroX1yPMJ0a87Te1YdB4Luxp1′,’employer1′,’[email protected]’,”,’2017-03-14 10:05:55′,”,1,’testing’),
    (10,’jameelnabbo’,’$P$B0pGzIXbfeh/9f9U4QjWSH.wIPhIjP1′,’jameelnabbo’,”,’https://www.facebook.com/app_scoped_user_id/414096782284927/’,’2017-03-14 10:11:25′,”,1,’Jameel Nabbo’),
    (12,’linkedin-Murtadha’,’$P$BLaa1nu.r/Wl1n5wX0MvM.4eSMGs/4/’,’linkedin-murtadha’,’[email protected]’,”,’2017-03-15 08:24:48′,”,1,’Murtadha Al-Yousef’);`

    As you can see on both fields are different. What you need to do is either skip ones not in the new table (like code, active, activeemail, reg_date, …etc.) Or, you can add those fields in the new table then migrate normally. If WP allows this, then add the fields from WP control panel. Otherwise, you need to add it in the table, but it might need custom programming to use in WP pages and features.

    Remember that field names are different and needed to be matched. This should go on all tables. It seems a bit more complicated than I anticipated, but doable.

    Good luck,

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Database Migration from php to wordpress’ is closed to new replies.