Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by
Can I run multiple forums from a single Q2A instance?

Thanks in advance

1 Answer

+2 votes
edited by

If you mean a single copy of the code then it’s not easy but there are ways.

Option 1

If you have access to the server, you can put the code in one folder and create symbolic links. Because the config will be different for each site you’ll need to put index.php and qa-config.php in every folder for each site, then add symbolic links for qa-content, qa-include, qa-lang, qa-plugin, qa-theme.

Option 2

It should be possible to point every site at the same folder and detect which site you’re on in the config, so you can use a different database or table prefix. For example if you’re using subdomains:

if ($_SERVER['HTTP_HOST'] === 'site1.example.com) {
    define('QA_MYSQL_TABLE_PREFIX', 'site1_');
} else if ($_SERVER['HTTP_HOST'] === 'site2.example.com) {
Thanks Scott. I use the first approach and it works fine except for 1 issue. All user registrations go to a common qa_users table so that they can use same login across the sites. But can I somehow make the userlist on each site load only those users who has at least loggedin once on that particular subdomain? I think somewhere I need to change qa_users table to qa_userpoints
Are you using the "user share" feature? i.e. QA_MYSQL_USERS_PREFIX in config
yes, exactly