Rewrite Rules / Permalinks broken after Migration

UpdraftPlus Home Forums Paid support forum – UpdraftPlus backup plugin Rewrite Rules / Permalinks broken after Migration

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2093563
    Jurac Björn Tarazona Roth
    Participant

    Hello,
    I have a rewrite rule that moves the loginpage to a different slug to block bot attacks on wp-login.
    Wp-login redirects to the homepage. This is not a problem when I resave the permalinks.
    The problem is that after migration from staging to live the permalinks and the rewrite rules seem to be broken until I resave the permalinks.
    That is not possible unless I ssh into the server and comment out the redirect for the default wp-login page. After saving the permalinks my /custom-login works again. How can I avoid this issue?

    This is a snippet of the code in my functions.php:

    add_action(‘updraftplus_restore_completed’, ‘flush_after_restore’);
    function flush_after_restore()
    {
    flush_rewrite_rules();
    }

    // Hide login
    add_action(‘init’, ‘custom_login_page’);
    add_action(‘init’, ‘custom_login_rewrite_rule’);

    #2093564
    Jurac Björn Tarazona Roth
    Participant
    This reply has been marked as moderator-only.
    #2094046
    Vanessa
    Moderator

    The only way around this would be to change your login URL via a plugin or via code (not through your .htaccess)
    The easiest way is to install a plugin like aiosplugin.com or https://wordpress.org/plugins/limit-login-attempts-reloaded/

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Rewrite Rules / Permalinks broken after Migration’ is closed to new replies.