Well that sure made me feel like an idiot

After my host finished moving me to a new server on Monday, I couldn’t figure out why WordPress wouldn’t connect to the database. Even though my host restored the site completely, including the database, I decided that, since I couldn’t figure out what was wrong, I would try restoring from my own backup instead. I knew my backups were good because I tested them locally. After some frustration it turned out that the thing I was doing wrong was that I had to write my cpanel username and an underscore before the mysql username. In other words, I had to write something like “cpaneluser_mysqluser” in wp-config.php whereas before I had always been just writing “mysqluser” and it worked. I suppose that’s good to know so I’m writing it down here in case I ever forget at some point in the future. As long as I’m making notes to myself though, I should also note that I must write “127.0.0.1” instead of “localhost”. That’s another thing I always forget.

Leave a Reply

Your email address will not be published. Required fields are marked *