WordPress.org

Support

Support » How-To and Troubleshooting » Login not working after move to remote server

Login not working after move to remote server

Viewing 4 replies - 1 through 4 (of 4 total)
  • Mark Ratledge
    Forum Moderator

    @songdogtech

    @songdogtech Thank-you for the very prompt response and the references. I’ll go through them in detail and report back – hopefully I have just missed a step in the transfer.

    The Login/out problem and white screens are fixed!
    There were some empty lines after the closing php tag in the custom theme’s functions.php file – I deleted these and can now log in/out. No more white screens either.
    Redirect problem still to be resolved…

    I suspect my page redirect problem was caused by inappropriate use of wp_redirect. I was using the code posted here to conditionally redirect to a page’s first child. I used the code within a loop, which worked fine locally but not on the live site.

    In the end I created a new page template for pages I want to redirect. The template consists of the following code:

    <?php /* Template Name: Redirect Page */ ?>
    <?php if (have_posts()) {
      while (have_posts()) {
        the_post();
        $pagekids = get_pages("child_of=".$post->ID."&sort_column=menu_order");
        $firstchild = $pagekids[0];
        wp_redirect(get_permalink($firstchild->ID));
      }
    } ?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Login not working after move to remote server’ is closed to new replies.