Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
1.2k views
in Q2A Core by
edited by

I'm trying to create a script to deintegrate my site with Wordpress.  Here are the steps I've identified so far:

1) create missing tables

2) create missing table constraints

3) migrate users from WP table to Q2A table, creating new password

4) email users with new password and notice of change

I'm wondering, first of all, if I'm still missing any steps, and second, if the first two steps can be automated by running  qa_db_install_tables() ?  It looks like qa_db_install_tables() will add the tables correctly, but I don't know enough about MySQL to know whether it will add the constraints or not.  Any insight?

UPDATE: Here's the script that seems to have done the trick, though I'm still not sure if I've missed anything.  One step I added was to change some of the existing tables userid field from bigint to int unsigned, which seems different between WP and Q2A.

https://github.com/NoahY/q2a-deintegrate

Q2A version: 1.6.1

3 Answers

+2 votes
by
jatin.soni developed such a plugin "Escape wordpress": http://question2answer.org/qa/25949/q2a-market-released-new-plugin-wp-escape

This might be what you need.

I am quite sure if you ask him, he will send you the source code for free. Because you are the one next to Gideon who pushed q2a far beyond!

All the best Noah,
Kai
by
Holy moly... $47!  Well, I guess it would be worth it.  Anyway, I made a script myself, though not sure if it is missing anything.  Still testing.  Thanks, though.
+1 vote
by
The best approach I found by using init_queires()
 
Since you are transferring WordPress data to Q2A tables you can create missing tables using init_queries() and do all transfers on the fly while creating tables. Like transferring user, user role and permission, etc.
 
Init_queries() also can delete WordPress tables and so once data transfer you can delete those. After that you just need to remove the WordPress path from qa-config.php file.
 
Only one thing I am still looking for is to transfer a password since both systems has a different approach to create a password, user must have to reset it once Q2A has been separated.
by
Sounds neat... I just created a stand-alone PHP script that accesses the databases without needing the Q2A functions.
by
That is also another way. I just prefer to use core function. BTW what are you planning for the password? any solution? I would love to know if you can find any solution to transfer the password
by
No, Wordpress passwords are one-way hashes, the only thing to do is reset the passwords and send out email notifications, I think.
by
Yeah that's true.. Just wonder to know that how you will reset the password?
0 votes
by
edited by

I offered this as a service in qa-themes.com a while ago. user just needs to upload my code in Q2A directory, and open it in the browser. it reads all variables and database information from Q2A and WP and imports useraccounts and profile fields from WP to Q2A and seperates them. just by pressing one button.


update: it's now on github:

https://github.com/Towhidn/Q2A-WP-Separator

...