I was working on my Wordpress site (hosted on DigitalOcean) using the ip address as the website address. I decided to change the address to my domain name so I went into settings and updated the address then pressed save. Then when I went to the domain name I was greeted with a 404. Going to the ip address redirected me to the domain name.

I tried adding lines in wp-config.php and functions.php with the new domain, but nothing changed when I tried accessing the site again. I tried to access the db through phpmyadmin but I got an error: mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES). Then I tried accessing the database via the console and while I could authenticate with the wordpress username and password, access was denied for all sql statements.

I would revert to my backup, but it was made 4 days ago and I had some significant edits since then.

  • I would reach out to DigitalOcean support and see if they could do a few things: 1) take a backup of the database now and give you a copy. This way you can load it into MySQL locally and see what's going on. 2) Help you figure out your MySQL permissions, it sounds like some major things got borked. 3) See if they can help you figure out how to do the IP => Domain switch, and maybe guide you to something that you missed in your DNS configuration or similar issues.
    – phatskat
    Commented Apr 2, 2019 at 3:20

1 Answer 1


Some things to check.

The 404, that is probably because your web server isn't configured correctly.

If you put a simple page in your WP root, like foo.php

echo "You made it";

and if you go to


and you don't get "you made it", then your webserver is misconfigured OR your DNS isn't pointing where you think it is pointing.

So as far as webserver configuration, if its apache, you have to map the DNS to the virtual host. My guess is that part is missing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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