I was unable to post comments yesterday, despite having been logged in. (Logged in users can post comments, anonymous users cannot). I kept getting prompted to (re)login. I discovered the root of the problem in the Admin settings: Options > General. I changed the WordPress URI value from “http://oceaninformatics.ucsd.edu/wordpress” to “http://oceaninformatics.ucsd.edu/blog”.

I had originally created the symbolic link “blog” to be an alias for “wordpress”. Before I changed the settings, cookies had been stored with the path “/wordpress”. These cookies were only retrievable if our site url read “http://…/wordpress”. Because we are using the url “http://…/blog”, the site was unable to read any cookies and authenticate its users. Changing the WordPress URI value in the settings fixed the problem.

To recreate this problem as an example, follow these steps:

  1. Log in to the site. You will be taken directly to your admin “Dashboard” page.
  2. View the blog site (click on View site)
  3. Click on the title of the first post you see. You are taken to a new page that displays only that entry.
  4. Scroll down the page and you will see a text box to insert a comment.
  5. Change the url in the address bar by replacing “blog” with “wordpress” and go to that new address.
  6. Scroll down the page again. The text box is gone and you are instead prompted to log in.

The lesson here is to be careful when using symbolic links with cookies.