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 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.
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
<?php
echo "You made it";
and if you go to
[my-domain-url]/foo.php
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.