wp-admin redirects to wrong website?!

Posted July 17, 2015 18.9k views

Hi guys, so everytime I try to go to it redirects and takes me to a blank page and the address bar says

I made sure I made the URL in the WP-admin (While it still worked) as the homepage url. But I can’t access wp-admin

Any ideas why?



These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

According to the WordPress Codex, this can happen for a large number of reasons. A large number of the fixes assume you have FTP access, so I’ll assume you have that (if not you can use nano in SSH as well).

Edit wp-config.php and add these lines:


See if you can log in.

If you still can’t login, you should try disabling all your plugins. Temporarily rename the plugins folder to something else, like old_plugins or something, and see if you can login.

Hopefully that helps, otherwise this webpage may prove useful :)

  • How could I do that through SSH or putty? FTP access is through the contorl panel right on digital ocean?

    The only access I have to my website is the wp-admin and digitalocean and serverpoint,

    wp-admin can’t be accessed though.

    I’ve tried to google instructions on how to edit the wp-config through the terminal or putty, but no instructions or tutorials that I can find!

  • @nqudimat didn’t you already edit this file as said in your other question?
    FTP is not natively installed in Droplets. Anyway, you can use SFTP
    But this would be pointless, you can just edit the file through the terminal:

    nano /dir/wp-config.php

    => Where dir is your Wordpress Installation directory.


  • @nqudimat Did you use the WordPress one-click application to make your Droplet? (When you were starting, did you click WordPress instead of an OS?)

  • If you used the WordPress one-click application, you could do what @missaglialfio said. The correct command you should use is:

    nano /var/www/wp-config.php

    That’s the default location of the wp-config file. That command would be run in SSH of course.