Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by
I have a q2a site bbb.com and a wordpress blog, aaa.com

I want to move bbb.com to aaa.com/bbb

I want to use the same bbb.com database to aaa.com/bbb website, with whole contents intact. I don't want to integrate the database of both the mai domain and subdomain.

Is it possible to do so? What changes should I do to achieve it?

In wordpress, we can make change in Site URL inside the database (phpmyadmin), I guess the same tactic will work with this too. Need immediate assistance, Thank you.
Q2A version: 1.6.3

1 Answer

+4 votes

You mention Wordpress but from your question I assume you don't want to integrate Q2A with Wordpress? In which case, the process is quite simple.

  1. Copy all the Q2A files to the aaa.com/bbb/ subfolder.
  2. Export your database from the first site (bbb.com). The most reliable way is using mysqldump on the command line but PHPMyAdmin works great if the database is not too large.
  3. Import the database into the second site (aaa.com). You will either need to create a new database (with the same name as the one you exported from), or modify your export code to import into the same database that Wordpress is using. (The table names should all be prefixed with qa_ so there is no conflict.)
  4. Update qa-config.php with the new MySQL details.
  5. The site may work well enough to go straight to it and edit settings. If not, edit the site_url option in the qa_options table of your database. Then it should work perfectly.
Thank you, I will check this method and will let you know.