Can't login to WordPress

by carolm
14 replies
I'm only a few weeks into running a website - and I've managed to lock myself out of my wp log in. I wanted to find out about putting a redirect on my site so all the htt.. traffic would go to the ww... address - or vice versa. I don't know much at all about HTML or code and have never used my cpanel for anything - too complicated - just use wp dashboard So....

I saw on the Settings General page that I had

WordPress Address (URL) both set to the same type of (ht...) etc
Site Address (URL)

I thought that might fix it so I changed the second one to the ww.... version to see if that would work - and couldn't see much difference to anything.

When I next tried to log in, I couldn't. It either kept refreshing and if I tried the other url version it told me they had no data for me or my email address on their database.

After checking forums I think this must have been what has messed it up. I've found what I think is the relevant file using cpanel:
and this is what is I think is the relevant piece of the contents:

<?php if ( !is_multisite() ) { ?>
<tr valign="top">
<th scope="row"><label for="siteurl"><?php _e('WordPress Address (URL)') ?></label></th>
<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) echo ' disabled' ?>" /></td>
</tr>
<tr valign="top">
<th scope="row"><label for="home"><?php _e('Site Address (URL)') ?></label></th>
<td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled' ?>" />
<span class="description"><?php _e(

and I'm totally confused: I hoped there would be the 2 url address versions there, and I'd just have to edit them to be the same, but no site name is there -

Q. Can someone tell my what I should change/delete/add to fix my problem?

Q.Also, do you think that change I made is the reason I can't log in now?

(answers in English would be appreciated- 'cos I don't speak #$%$#*&^, yet.)
#login #wordpress
  • Profile picture of the author owais
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[5634251].message }}
    • Profile picture of the author carolm
      Originally Posted by owais View Post

      teLL YOUR Admin Pannel.
      Do you mean my Hostgator support? I assume they won't help because they say they don't deal with wp support, only downloading of wp. I emailed wp to the address that sent my initial login details but they haven't replied.
      {{ DiscussionBoard.errors[5634530].message }}
  • Profile picture of the author K Meier
    Login to PHPMyAdmin (can be found in your cPanel). Then select the database you're using. On the left side you should see a list of all tables in that database. Click on the wp_options one.

    Now browse through the entries of that table and look for the column "sitetitle" and "home".

    Once you find them, edit them and set your URL again.
    {{ DiscussionBoard.errors[5634428].message }}
    • Profile picture of the author carolm
      Originally Posted by K Meier View Post

      Now browse through the entries of that table and look for the column "sitetitle" and "home".

      Once you find them, edit them and set your URL again.
      I think I did that and got to the HTML that I copy/pasted above, but how do I edit them and reset my URL?

      I can see the 'sitetitle' and 'home' (highlighted) but I don't see a url to edit.
      {{ DiscussionBoard.errors[5634517].message }}
  • Profile picture of the author SteveJohnson
    He's talking about in the actual database.

    It sounds as if you may be a little confused as to WordPress when you say,
    I emailed wp to the address that sent my initial login details but they haven't replied.
    If WordPress is set up on your HostGator account, everything concerning your site is self-contained on your server - there is no "they" that will reply.

    Are you sure you weren't trying to get into an account you'd set up on wordpress.com?

    Regardless, you can solve your address problem by editing the wp-config.php file. It is in the 'root' directory of your wordpress installation (in the same place you see the wp-admin, wp-content, and wp-includes folders). You can use the file editor in your cpanel, or download via FTP and edit in Notepad.

    Add the following lines (switch the URLs in the example to your URLs) just above the line in the file where it says "stop editing":
    Code:
    define( 'WP_SITEURL', 'http://example.com' );
    define( 'WP_HOME', 'http://example.com' );
    Be sure to include the semi-colons at the end of the lines.

    You should now be able to log into your dashboard.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[5637389].message }}
    • Profile picture of the author carolm
      Originally Posted by SteveJohnson View Post


      Regardless, you can solve your address problem by editing the wp-config.php file. It is in the 'root' directory of your wordpress installation (in the same place you see the wp-admin, wp-content, and wp-includes folders). You can use the file editor in your cpanel, or download via FTP and edit in Notepad.

      Add the following lines (switch the URLs in the example to your URLs) just above the line in the file where it says "stop editing":

      define( 'WP_SITEURL',
      define( 'WP_HOME',
      Be sure to include the semi-colons at the end of the lines.

      You should now be able to log into your dashboard.
      Feedback: my problem is solved - here's what I did:

      Steve, I tried your 'go to wp-config.php file' and found a whole batch of
      'define.....' there, but not a siteurl or homeurl to be seen - did a 'Find' search and they just weren't there.

      After a few hours of trying to work it out, I went to Hostgator Live Chat - I don't know if they are 'supposed' to help me with this but they did (HG is the best!)
      I told them I couldn't log in any more etc so they said, " I'll check" - 7 minutes later he said he'd fixed it, and he had.

      Naturally, I asked him what he'd done and where, and he said "I changed it in phpmyadmin ' - I later went there to try to see what he'd done and failed miserably - couldn't even find the siteurl etc.

      I asked him lots of other questions which he answered - then he said 'In all the time I've been with HG, you are the first customer who ever had any curiosity to know what I'd done and where, and how etc.'

      Can you believe that? I was amazed - shocked even.

      Anyway - Hostgator saved my bacon so I'll give them a big pat on the back here. I recommend them - 10 stars from me.
      {{ DiscussionBoard.errors[5642228].message }}
  • Profile picture of the author farishussain
    Goto PHPMYADMIN and change the password its easy
    {{ DiscussionBoard.errors[5637421].message }}
    • Profile picture of the author K Meier
      Originally Posted by farishussain View Post

      Goto PHPMYADMIN and change the password its easy
      Now that's a useless answer. First off, that is not his issue and second you can't change the password in PHPMyAdmin directly as it's being hashed and salted when it's being created via wordpress registration page.
      {{ DiscussionBoard.errors[5637538].message }}
      • Profile picture of the author SteveJohnson
        Originally Posted by K Meier View Post

        Now that's a useless answer. First off, that is not his issue and second you can't change the password in PHPMyAdmin directly as it's being hashed and salted when it's being created via wordpress registration page.
        Actually, you can, but it should only be done as a last resort and then use the profile page to change the password again. WP will still test against an MD5 version of the password.

        But you're right too - it was a useless answer

        hash it as a MD5 encrypted password, and paste into the password field.
        Isn't it a little easier to just choose MD5 (SHA1 works too, btw) from the Function dropdown on the phpMyAdmin edit screen?
        Signature

        The 2nd Amendment, 1789 - The Original Homeland Security.

        Gun control means never having to say, "I missed you."

        {{ DiscussionBoard.errors[5637661].message }}
  • Profile picture of the author kokopelli
    Originally Posted by K Meier

    you can't change the password in PHPMyAdmin directly
    Actually, you can - I do it all the time. Just create your password, hash it as a MD5 encrypted password, and paste into the password field. Save, login. I use the Firefox extension Fire Hash (I previously used Fire Encrypter).
    Signature
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {{ DiscussionBoard.errors[5637635].message }}
  • Profile picture of the author SteveJohnson
    Carol, they're not in the wp-config.php file 'from the factory'. That's why I wrote to ADD them

    Anyway, glad you got it sorted out.

    The siteurl, homeurl, and a great many other options are stored in the wp_options table. Browse the table, then sort the table by the ID. You'll see both siteurl and home in the first 25 or so entries.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[5645555].message }}
  • Profile picture of the author carolm
    Thanks Steve - you may wonder why I have 3 posts above - I'm not 'post stuffing' - I tried to post last night but Warrior was 'down' for posting replies - now this morning all 3 of my attempts to post are here - maybe a mod will come in and clean up.

    This has been my first toe in the water experience of my cpanel and I've learned a few things at least - still not enough to know how to 'use' it. I had a quick look when I first signed up a few weeks ago, but couldn't make sense of any of it - and everything I selected and clicked 'View' showed No data available or this 'whatever' is empty. All my searches always say - no data found. Yesterday I used the 'search' in cpanel for all the terms you guys said I should find and every time I got - no data or similar - which is ridiculous - I know it was all there, but the search option couldn't find anything.

    I made a note at the time after trying to work out what msql was - it was.... 'hopefully I'll never have to use this' and from then on I just stuck with the wp dashboard.

    I also had a look at Filezilla and couldn't understand anything - a foreign language - even the 'explanations' were a foreign language - a bit like how I remember it was, when our Maths teacher at school tried to 'explain' something I didn't understand by just repeating what I didn't understand in the first place, but louder.

    I know I can get info on HTML at 3schools.com and when I have time I'll learn some of that. But that's not 'how to use cpanel' - HG tutorials are either setting up stuff (really easy and useful) but then when they have tutorials about cpanel I don't understand the words/terms they use. And their tutorials still don't explain how cpanel is organised - it's structure and architecture and what all the different icons do.

    Things like: What is an index page, or a database, or a directory, and how are they different and what do you do with them and how - how do you 'edit' things - all the 'explanations' and/or replies say 'edit this' (how? what with? where is what you need to use to edit located?) or 'First, upload an ftp' - what does that even mean?

    Does anyone know of a good website that explains an over-view of 'how cpanel is structured and what all the different icons do' - I looked at wikipedia but that wasn't much help

    Meanwhile..... my main focus is to work on my new websites, and learn wp, and publish more 'stuff' and get traffic - that's my main priority at this stage and takes up all of my time. I'm going to shut-up now (about time!) and get to work.

    BTW this forum is really, really useful and the members here are always helpful and patient with idiots like me - so thanks guys (and gals).
    {{ DiscussionBoard.errors[5646234].message }}
  • Profile picture of the author SteveJohnson
    I knew you weren't stuffing posts. You can delete them yourself, though. Click edit, then you'll see a delete button.

    You have the right priorities - do what's going to make you money, and don't get all caught up in the details
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[5650065].message }}
    • Profile picture of the author carolm
      Originally Posted by SteveJohnson View Post

      I knew you weren't stuffing posts. You can delete them yourself, though. Click edit, then you'll see a delete button.

      You have the right priorities - do what's going to make you money, and don't get all caught up in the details
      Thanks for your help Steve, and others.

      One thing that puzzles me is why does wp put an option that can shut beginners totally out of their own website as the first option you get when you open Settings>General - with no warning.

      Most people would assume that a simple check-box option on the dashboard would be able to be changed back again if you didn't like the result. From searching the forums and generally online, I'm not the only person to do this without realizing the consequences and then, not know how to fix it.

      It's like deliberately laying a camouflaged trap in the path of beginners. They should either put a great big warning sign there, or, even better, bury it somewhere in wp where only people who understand this option can use it - say, in an Advanced Section which also has a good explanation of what it does and when you might want to use it.
      {{ DiscussionBoard.errors[5651460].message }}
  • Profile picture of the author bbleo
    we can change password from phpmyadmin directly, just encrypt to md5 from any online md5 encryptor site and post in your phpmyadmin users table.
    {{ DiscussionBoard.errors[5661407].message }}

Trending Topics