• Hello all

    Firstly i entered my admin normally and changed the URI, URL fields to point to the root of my site https://www.epothitaki.gr/

    Then i moved my wp site from the /wp folder to the root using ftp.

    Then i tried to login but it seems i’ ve fallen to a redirection loop.

    I tried everything from the login trouble codex (entering database, changing admin passwords, renaming plugins or theme, editing wp-login.php) without success
    Please give me a hand!

    Thanks
    Dimitris

Viewing 8 replies - 1 through 8 (of 8 total)
  • Assuming you put all the files of your WordPress site in the root of https://www.epothitaki.gr, try putting this in your wp-config.php file:

    update_option('siteurl','https://www.epothitaki.gr');
    update_option('home','https://www.epothitaki.gr');

    See if that makes your site working. If it does, you can remove the lines again.

    Thread Starter mhtcka

    (@mhtcka)

    Hi Senff,

    First of all, thanks for your support.
    i tried your php addition but it didn’t solve the loop problem. I can reach the login page from https://www.epothitaki.gr/wp-admin and put the correct user/pass but it keeps sending me to the same login page again and again…

    One question:
    When moving the files from my subdirectory /wp to my root i also copied the .htaccess file. Does this interfere somehow?

    thanks again
    D.

    Thread Starter mhtcka

    (@mhtcka)

    Well to sum things up:

    – had wordpress installed in /wp
    – backed up files+db ok
    – changed URI, URL and saved ok
    – moved files to root folder ok
    – copied .htaccess from /wp and pasted to my root ok

    problem starts when accessing https://www.epothitaki.gr/wp-admin/
    which redirects me to:
    https://epothitaki.gr/wp-login.php?redirect_to=http%253A%252F%252Fepothitaki.gr%252Fwp-admin%252F&reauth=1

    where i put the correct admin user/pass but it keeps resending me to the page https://epothitaki.gr/wp-login.php

    so i understand that there is a loop between wp-login.php with a redirection script that i really don’t know how it came there…

    any ideas on how to fix this?

    What if you add these lines to your wp-config.php, does that make any difference maybe?

    define( 'WP_HOME', 'https://epothitaki.gr' );
    define( 'WP_SITEURL', 'https://epothitaki.gr' );
    Thread Starter mhtcka

    (@mhtcka)

    ok senff you are being helpful mate…

    so,
    i changed these 2 lines in wp-cong=fig.php and it worked
    now when i put >> https://www.epothitaki.gr/
    it redirects me to >> https://epothitaki.gr (without www)
    also,
    i can enter admin dashboard with user/pass = ok

    however:
    in the admin > settings > general i can see under URL, URI the 2 fields (with the root url without www) but i can’t edit them anymore…
    do i have to erase the two lines form the wp-config.php now that i got it working?

    Thread Starter mhtcka

    (@mhtcka)

    hallo senff,

    as i mentioned before your trick on wp-config.php worked and i managed to get out of this redirection loop.

    Now, i have access to my admin dashboard, but i cannot change the URI, URL in general settings (probably due to the php lines i put).

    Moreover, some of the plugins that worked before are now faulty especially one slider plugin and wpml multilingual plugin.
    I tried several times to re-install these without success, and i feel a little frustrated…

    I was thinking about going back to my draft website (/wp) to see if things are working like before and then re-try to move to root..
    if i decide to do this i believe i will have to delete the two php lines from wp-config.php
    what do you suggest?

    thanks again
    Dimitris

    Indeed, using these lines will disable the option to change them:

    define( 'WP_HOME', 'https://epothitaki.gr' );
    define( 'WP_SITEURL', 'https://epothitaki.gr' );

    That’s why these lines should be better:

    update_option('siteurl','https://epothitaki.gr');
    update_option('home','https://epothitaki.gr');

    This should have the same effect (except that with update_option, you can remove these lines again once you get things working).

    Can you try this again and replace the define lines with the update_option lines?

    Thread Starter mhtcka

    (@mhtcka)

    Ok senff

    indeed update_option was the trick to use
    and then erase it because it interfered with plugin functionality
    still i don’t get how i got into this loop…
    but anyway problem solved
    website back in functionality

    thanks for your time
    Dimitris
    Athens

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Help Please – Cannot Login to admin after moving WP to root’ is closed to new replies.