Skip to main content

Integrate a fully functional Q&A section in your WordPress website

Integrate a fully functional Q&A section in your WordPress website  阅读原文»

Do you want to add Q&A section in your WordPress website that is fully integrated with WordPress user management system and database? With this method, your Q&A section and your WordPress website share the same database and user-management system.

In this beginner tutorial, you will be using "Question2Answer" which is an open source Q&A platform that can provide similar functionality to top question and answer websites like StackOverflow. This tutorial will illustrate the complete steps of integrating this Q&A platform to your existing WordPress website. This also assumes you are installing WordPress in the root directory of your domain.

The integration is actually very simple; just follow the steps below:

Preparatory Steps before Uploading Question2Answer

1.) Download the latest Question2Answer version to your Desktop and extract it.

2.) First, you need to know the WordPress path in your server. To do this, open a notepad or any text editor, then copy and paste the code below:

<?php echo $_SERVER['SCRIPT_FILENAME']; ?>

Then save it as absolutepath.php

3.) Upload this script to your WordPress root directory (the same path where wp-load.php is found).

4.) Finally access this script using a web browser. Since you have installed WordPress in the root directory of your domain; you can enter this URL in the browser and press enter to get the path:

Or if you are using a sub-domain which is using WordPress in its root directory, you can run absolutepath.php like this:

It should return this result in the browser such as:


Remove the absolutepath.php from the above result, and then the remaining is your WordPress path. For example, this is the WordPress path based on the above result:


Take note of this path.

5.) Go to the extracted "Question2Answer" folder and find qa-config-example.php.

6.) Open qa-config-example.php and find this line:


By default this is commented in PHP so you need to uncomment this line. Then replace:


With your WordPress path as determined in the previous steps:

define('QA_WORDPRESS_INTEGRATE_PATH', '/home/phpdevel/public_html/');

This is how it looks like after doing these changes, take note that the line is now uncommented:

Then save it as qa-config.php. You can now safely delete qa-config-example.php.

7.) Login to your server using an SSH client (recommended than using FTP because of security) and create a folder at the root directory of your WordPress website. Assign a good name to your WordPress Q&A section that makes it easy for your visitors to understand and make it SEO friendly. For example, if you are running a PHP programming website and would like your readers to ask a question, you can name the folder as: "php-programming-help". See the screenshot below showing this created folder at the root directory of your WordPress website:

8.) Using an SSH Client such as Filezilla, right click on the created folder and click "File permissions". Assign a file permission of 755 to this folder.

Uploading and Installation of Question2Answer

9.) It is time to upload Questions2Answer to your WordPress website. Using an SSH client; connect to your server and go inside the created folder for Question2Answer files (e.g. "php-programming-help" in the above example). This is how it looks with Filezilla GUI:

10.) Upload all the files and folders of the Question2Answer core files including the qa-config.php, .htaccess, etc. It can take some time, wait until all files are completely uploaded and then you can see it like this one below:

11.) Launch a web browser and then enter the Question2Answer URL to install the software. If your Q&A folder is named as QA; then the path to enter would be:

In the previous example on setting a php programing help section on your WordPress website, this is the URL to enter in the browser address bar:

12.) The first thing you would see is that Question2Answer will ask you to set up the database. Click the "Create Database" button.

13.) If you see the message "Your Question2Answer database has been created and integrated with your WordPress site." click "Go to Admin Center" then login as an administrator.

14.) Since Question2Answer is now integrated with WordPress database, login using your WordPress administrator credentials. Bear in mind that if you click the login link, it would be redirected to your WordPress login page.

15.) Finally after successful authentication, you should be able to see the Question2Answer:

The quickest admin configuration you could do is to set for user/SEO friendly URLs in your Q&A site integrated with WordPress which is supported since you are using htaccess. The rest are easy and simple. For configuration details and editing of your Q&A templates; you can go to the official website: for related documentation.

You can further secure your Q&A site by reading some tips here. Now if a user registers your site, it will automatically be managed by WordPress and all questions and answers would be saved in the same database used by WordPress.


该邮件由 QQ邮件列表 推送。
如果您不想继续收到该邮件,可点此 退订


  1. Your blog's organisation and formatting, along with your writing skills, have greatly amazed me. Is that a custom topic you made, or was it something you purchased? Anyway, keep up the excellent writing; these days it's hard to see a great website like this one.


Post a Comment

Popular posts from this blog

How to find ideas to post new article in your blog

How to find ideas to post new article in your blog    阅读原文»   It is true that sometimes being a blogger may face situations where I would personally like to call it your brain juices got dried up as you have pretty much ran out of topic to blog and you are in crisis as your readers are anxiously waiting for your new posts but you are unable to give in. That’s when you will probably come with excuses like I just posted last week although that post was more directly towards the newbies who stop themselves from making money but it’s still pretty much the same even though you consider yourself not a newbie. The fact is that ideas are everywhere and I mean everywhere if you know where to find it and know how to leverage it. You may be surprised that sometimes these ideas are just right in front of you but you are not observant enough to convert these ideas and turn it into your blog post. Today I will share some tips on where to get these ideas and most of it is part of your dai

Over A Year After Android Launch, ShopSavvy Finally Comes To The iPhone

ShopSavvy was one of the best early Android applications. It launched in October of last year after winning one of the initial Android Developer Challenge top prizes (when it was still known as GoCart). But despite the success it has seen on Android, one question remained: When would it be available for the iPhone. Today, it finally is. Developed by the guys at Big In Japan , ShopSavvy is an app that allows you to use your device as a portable barcode scanner. You point your phone's camera at any barcode and it will read it, do a product look up, and give you information about the product, as well as where you can find it online or at nearby stores and for how much. Obviously, something like this is a window shopper's dream. ShopSavvy was one of the best early Android applications. It launched in October of last year after winning one of the initial Android Developer Challenge top prizes (when it was still known as GoCart). But despite the success it has seen on Android, o

部门心脏?您好!!              生产计划与物料控制PMC高级研修班 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 课程背景: 生产计划和物料控制(PMC)部门是一个企业"心脏", 掌握着企业生产及物料运作的总调度 和命脉,统筹营运资金、物流、信息等动脉,直接涉及影响生产部、生产工程部、采购、货仓、品 控部、开发与设计部、设备工程、人力资源及财务成本预算控制等,其制度和流程决定公司盈利成 败.因此PMC部门和相关管理层必须充分了解:物料计划、请购、物料调度、物料控制(收、发、退、 借、备料等)、生产计划与生产进度控制,并谙熟运用这门管理技术来解决问题,学习拉动计划价 值流(VSM)图,从拉动计划价值流切入剖析工厂制造成本和缩短制造周期 ,提高物流过程循环效 率(库存、资金的周转率)及客户满意率;为降低或消除物流过程中的非增值活动. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 课程目标: 1、建立制定完善的生产与物控运作体系?提升准时交货和降低库存成本 2、预测及制定合理的短、中、长期销售计划?达成公司策略管理目标 3、对自身的生产能力负荷预先进行详细分析并建立完善产品数据机制协助公司建立产品工程数据 4、生产前期做好完整的生产排程和周生产计划?提高备料准确率,保持生产顺畅 5、配合生产计划做到良好物料损耗控制和备料?完善降低物料损耗机制和停工待料工时 6、对生产进度及物料进度及时跟进和沟通协调?缩短生产周期,提高企业竞争力 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 报名详情: 培训时间:2012年11月 3- 4深圳 11月15-16上海 11月22-23北京 12月 1- 2广州 承办单位:新 活 力 顾 问 培训对象:生产计划部门、物料计划部门、采购部门、 生产部门、销售部门、物流、研发部门、 PIE、IT 培训费用:3200元/人(包括资料费、午餐及上下午茶点等) 报名热线:400-623-8399 (免长途话费) 电邮: QQ:120915