From version 1.4, Question2Answer offers out-of-the-box integration with your WordPress 3+ site and user database. To install Question2Answer as part of your WordPress site, please follow the instructions below:
Download the latest version of Question2Answer to your computer or web server (also available on GitHub).
Unzip the download using a tool such as WinZip (or unzip in the Unix shell).
unzip
Find qa-config-example.php and .htaccess-example in the unzipped question2answer folder, and rename them to qa-config.php and .htaccess, respectively.
qa-config-example.php
.htaccess-example
question2answer
qa-config.php
.htaccess
Open qa-config.php in a text editor and insert the following line next to another define(...) in the file:
define(...)
define('QA_WORDPRESS_INTEGRATE_PATH', '**/PATH/TO/WORDPRESS**');
Replace **/PATH/TO/WORDPRESS** in the example with the full path to the WordPress directory on your server, i.e. the directory which contains wp-load.php. You do not need to set your MySQL database details in qa-config.php since these are imported from WordPress automatically. Q2A and WordPress will use separate tables within the same MySQL database.
**/PATH/TO/WORDPRESS**
wp-load.php
http://www.mysite.com/qa/
http://qa.mysite.com/
http://www.mysite.com/
http://www.mysite.com/blog/
wp-config.php
define('COOKIEPATH', '/');
http://blog.mysite.com/
Add the following lines at the start of the WordPress wp-config.php file, replacing **.mysite.com** with a period (.) followed by the partial domain name which is shared by both sites:
**.mysite.com**
define('COOKIEPATH', '/'); define('COOKIE_DOMAIN', **'.mysite.com'**);
Add the following lines at the end of the WordPress wp-config.php file, replacing **qa.mysite.com** with the full domain name for your Q2A site:
**qa.mysite.com**
/* To allow redirection from WordPress login to Question2Answer */ add_filter('allowed_redirect_hosts', 'qa_wordpress_redirect_hosts'); function qa_wordpress_redirect_hosts($content) { $content[] = **'qa.mysite.com'**; return $content; }
Follow the on-screen instructions to set up your database and Question2Answer functionality.
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.