WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I set my domain in the WordPress without www i.e xyz.com but realised after setting that xyz.com wasn't redirecting to www.xyz.com. Now I am unable to login into the admin panel. I grepped through the code but saw that the domain is not set as a value to any variable. Is it saved in the DB? How can I change it?

share|improve this question

You need to change your url for two places one is for "WordPress address (URL)" and for "Site address (URL)"

As you are unable to login to admin panel there is one option you can change it by modifying your database table in phpmyadmin. You might also need to udate Upload URL as well.

Easiest way to search tables is search your defined URL (e.g xyz.com) than you will find all tables using that URL than change all those to your full URL I would prefer with http (e.g. http://www.xyz.com)

Also check your config.php at root and if url is there and not correct than change it too.

If you are not using such plugin than it should not more than 2-3 places.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.