0

I used hostgator to host my WordPress site. At the time, I couldn't find a way to keep the URL for the site as mysite.com, and I was in a rush so I made it mysite.com/main and figured I'd just change it later.

In the WordPress dashboard under settings, you can change the WordPress URL and then another URL option. After reading the short description, I changed the latter to be mysite.com and it worked, but then I couldn't view the site or view any changes I made because it said I wasn't authorized (I was still in the same session).

So, I logged out and tried to log back in but couldn't. I tried logging in at wordpress.com and wordpress.org and could not log in to either (I wasn't sure which one). I've tried to find a solution but I cant seem to find this issue posted anywhere and I can't access any WordPress service to get help. Does anybody have any suggestions?

closed as off-topic by Michael, Jack Johansson, cjbj, kraftner, Max Yudin Jul 5 '17 at 8:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Michael, Jack Johansson, cjbj, kraftner, Max Yudin
If this question can be reworded to fit the rules in the help center, please edit the question.

  • So you have your own version of WP running at a webspace at hostgator? Then you need to log in there, it is in no way connecetd to either wordpress.org or .com – kero Jul 3 '17 at 17:14
  • Thanks, that explains why I cant log in directly through those, but I still cant log in the exact way that Ive always logged in, which is going to the site (which still has the wordpress coming soon page) and then going to admin log in, and entering my credentials through a /wp-login.php page. Ive tried a number of suggestions from slightly different issues where people cant log in and none of them have worked – Jon Jul 3 '17 at 17:27
  • "can't log in" is too vague. Does it give you an error? Can you reset the password? etc – kero Jul 3 '17 at 17:31
  • sorry. It says my username is invalid and the passowrd reset says ERROR: There is no user registered with that email address. – Jon Jul 3 '17 at 17:33
2

You may need to use your hosting accounts phpMyAdmin to edit the wp_options table. There are two spots (rows) in that table that contain the URL of your WP site. Change both of the values to your URL, and you should be able to access things.

  • Okay so the two were different and now they are the same and both the value that I want, but I still get the same errors mentioned in the above comments when I log in. The username is listed in the database, as is the email. – Jon Jul 3 '17 at 17:47
  • Make sure that the URL to login is something like yourdomain.com/wp-admin .... without any extra parameters at the end. (Perhaps copy/paste your login url, but put 'yourdomain.com' in place of the actual domain name). You can also go into the wp_users table and look for your user entry, and verify the email address is correct; then use the 'lost password' thing to reset the password. (Don't change the password field in that row..that requires extra steps to do. I've found the 'lost password' works after verifying the correct email address in that row.) – Rick Hellewell Jul 3 '17 at 19:11
  • So I have two tables, something_wrdp1 and something_wordp2, the credentials that I use are in the second one, but my site seems to use the first database. So I copied the credential I wanted into the first database to try to log in and the site it logged into was bare. So how could I get it to use the second database which clearly has everything ive worked on so far? – Jon Jul 3 '17 at 19:19
  • You'll need to edit you wp-config.php file to use the second database. Add your preferred database name, username and password. – Samuel Asor Jul 3 '17 at 20:27
  • While it is true that the wp-config.php file contains the database credentials, that was not included in your original question. Assuming you have only 1 WP site, it uses the database specified in the wp-config.php file. The WP site's URL is contained in the wp_options table of the database contained in the wp-config.php file. If you are going to mix up those things, then all sorts of weirdness will happen. You need to get back to 1 WP installation, with the URL specificed in that database's wp_options table. The email to recover/reset your password is found in that databases' wp_users table. – Rick Hellewell Jul 3 '17 at 20:46

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