• Resolved falvares

    (@falvares)


    Hi,

    Just today I noticed that my blog (https://www.pinkylotus.com.br/Blog/) was presenting an error when trying to view “older posts”.

    When I select link “Older posts” (in may case “Posts mais antigos ?”, because it is in portuguese), instead of getting the correct URL that should be “https://www.pinkylotus.com.br/Blog/?paged=2” it presented the URL “https://www.pinkylotus.com.br/blog/Blog/?paged=2” that led to error 404.

    So, I logged as admin, went to “Settings -> General” and changed fields “WordPress address (URL)” and “Site address (URL)” to “https://www.pinkylotus.com.br”, in an attempt to eliminate the double “/blog/Blog” in the generated URLs.

    At the momment I pressed the “Save Changes” button, I gor the 404 message, and coudn’t perform any function the the Control Pannel.

    Thied to open a fresh session, loging in again as admin, but got a tottaly unformatted login screen. Anyway, tryed to login in, but got the 404 message.

    At this point, viewing the blog https://www.pinkylotus.com.br/Blog/ got a completelly unformatted page.

    Thought I was facing a problem with login in (pretty obvious), so tried to fin help in Codex, and found “Login Trouble” at https://codex.www.ads-software.com/Login_Trouble, and tryed the following steps:

    1 – Enable Cookies

    2 – New Login File. Editing wp-login.php: “$user_login = $user_data->user_login;” was already there.

    3 – Edit Users Table. Edited users table as told (specified new password and set Function drop-down list to MD5)

    4 – Site URL Redirecting.

    4.1 – Changed site_url wp-options in table to https://www.pinkylotus.com.br/blog
    4.2 – Commented wp-login.php lines
    //if ( dirname(‘https://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘PHP_SELF’]) != get_settings(‘siteurl’) )
    // update_option(‘siteurl’, dirname(‘https://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘PHP_SELF’]) );

    Tried to login. Didn’t work.

    4.3 – Inserted lines:
    update_option(‘siteurl’, ‘https://www.pinkylotus.com.br/blog’ );
    update_option(‘home’, ‘https://www.pinkylotus.com.br/blog’ );
    just after
    //if ( dirname(‘https://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘PHP_SELF’]) != get_settings(‘siteurl’) )
    // update_option(‘siteurl’, dirname(‘https://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘PHP_SELF’]) );

    Tried to login. Didn’t work.

    5 – Check Your URL Options: “siteurl” and “home” both set to “https://www.pinkylotus.com.br/blog”

    6 – If All Else Fails. Here am I posting this message.

    I apologise for this massive post, but wanted to show all steps I did.

    Any help will be highly appreciated.

    Thanks!

    Fernando

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter falvares

    (@falvares)

    Hi esmi, thanks for replying!

    Performed steps:

    1 – Edit wp-config.php

    define(‘WP_HOME’,’https://pinkylotus.com.br/blog’);
    define(‘WP_SITEURL’,’https://pinkylotus.com.br/blog’);

    Tried to login. Didn’t work.

    2 – Edit functions.php (while keeping changes made in step 1)
    <?php
    update_option(‘siteurl’,’https://pinkylotus.com.br/blog&#8217;);
    update_option(‘home’,’https://pinkylotus.com.br/blog&#8217;);

    Tried to login. Didn’t work.

    3 – Changing the URL directly in the database (while keeping changes made in steps 1 and 2)

    Tried to login. Didn’t work.

    Repeated step 2 – Edit functions.php (while keeping changes made in step 1)
    <?php
    >>> Removed lines inserted in previous step 2

    Tried to login. Didn’t work.

    At last I have the wp-config.php without additions made in step 1, functions.php without additions made at step 2 and just the database changes made at step 3.

    Tried to login. Didn’t work. The blog shows ok and so does the login page, but when I try to log in, the 404 page appears.

    I can tell you that I’m really amazed. Found lots of posts dealing with this very same problem (dating from years ago) I’m facing and couln’t figure out a way to solve my problem.

    Hope you can give me further advice.

    Thanks again!

    Fernando

    Thread Starter falvares

    (@falvares)

    Unbelievealable, it worked!

    So, in the database, URLs ARE case sensitive (as in the admin settings in the dashboard, I suppose).

    As a “side effect”, it already solved my original problem: “When I select link “Older posts” (in may case “Posts mais antigos ?”, because it is in portuguese), instead of getting the correct URL that should be…“.

    Thanks a lot esmi, you saved my day!

    Regards,
    Fernando

    So, in the database, URLs ARE case sensitive (as in the admin settings in the dashboard, I suppose).

    It depends upon the server/host. Some automatically convert all folder & file names to lowercase. Others (like yours) don’t. Generally speaking, it’s always best to stick to lowercase for folder and file names.

    Glad to hear that you’ve got access again, anyway. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can't log in after changed administrative settings’ is closed to new replies.