Getting logged out of Wordpress and can’t log back in?

If you haveWordPress 1.2.2, and you have your blog directory in, say, http://domain.com/myblog/, and your wordpress directory in a different directory, say, http://domain.com/wordpress/, and you delete your cookies, it can be impossible to log back in, even if you have the correct username and password.

How can you tell? You are trying to log in, and it doesn’t let you but reloads the login form, but without an error. That means you have the right username and pass, but something else is wrong.

Here’s how to fix this problem.

  1. Go to Mysql, you can use PHPMyAdmin, most hosts have that installed.
  2. Go to the options table, and find the row in which the option_name field = http://domain.com/myblog/. On the command line, or in PHPMyAdmin’s SQL page, you can enter this: SELECT * FROM `options` WHERE option_name = ‘home’;
  3. Change the value of that field to your wordpress directory: http://domain.com/wordpress/
  4. Now go login to your wordpress. It should work fine and let you log in.
  5. Back to the same row in the database, change the value back to http://domain.com/myblog/
  6. Go check your blog. It should work fine.

You’re done.

Leave a Reply