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

I have installed Q2A 1.7.4 for wordpress on my localhost (windows XAMPP) and everything was working quite well. Then I logged out and now I can't login to Q2A anymore. When I click on login, i get redirected to the wordpress login. I login as admin, login succeeds and redirects me back to the Q2A site. But there, I'm not logged in...

What am I doing wrong? Wordpress did an automatic update to 4.7.2 nearly at the same time, may that be the reason?

There are no log messages generated in the apache error.log. My installation directories:



Thanks for your help!

2 Answers

+3 votes
Best answer

Ok I found the answer myself. I just wasn't reading the installation description carefully enough. When you have your wordpress and question2answer folders on the same level (like me) the description tells you that you have to add the line define('COOKIEPATH', '/'); to the wp_config.php.

I was adding it to the qa-config.php. So that's why question2answer always thought I'm not logged in. It had no access to the cookies that indicate that you are logged in.

Good to know that.

can you please explain step by step how to integrate wordpress and q2a. May be helpful to some in future. Thanks!
The installation guide the Q2A site provides for the wordpress integration which i linked to is already a very detailed step by step guide. You just have to read carefully in which config file you have to put which line of code because there names look similar (if you read too fast): wp_config.php vs. qa-config.php

So to prevent this in the future maybe a sentence like this: "put the following line of code into wp_config.php" could be changed into "put the following line of code into the wordpress configuration file (wp_config.php)".
Ok, thank you.
+1 vote
Just checked wordpress version log, I dont see any major changes. Can you restart your server and check again. Let us know if that works.

Thanks for your answer!

I just restarted XAMPP and the problem still appears. Is there any configuration that I did wrong that could lead to this effect? I just double checked the guide on how to install Q2A for wordpress and for me it looks like I have done everything in the correct way.

I'm thinking about switching from the wordpress user system to the Q2A native user system as I don't have a blog anyway.