Support » Fixing WordPress » Locked out of Backend

  • I can’t get into the admin backend after upgrading. The log-in screen redirects to ‘’ where I get a nice message saying “WordPress has been updated! Before we send you on your way, we have to update your database to the newest version. The update process may take a little while, so please be patient.” If I click on the button that says “Update”, I’m redirected to ‘’ which is a nice blank screen with WP logo at the top. I have tried renaming my theme and my plugin folders, but it still takes me through the same dead loop. The site is still functioning fine, but I can’t get into the dashboard.

    Any suggestions?

Viewing 12 replies - 1 through 12 (of 12 total)
  • I wonder if it has anything to do with the permissions. Try changing your root directory to 777 and try the update again, maybe WordPress using the nobody account can’t do what it wants to do. I don’t know really.

    Another thought, do you have a backup of wp-config.php and htacccess from before the update?

    I have a backup. htaccess is still a 2012 version, so it wasn’t updated. wp-config.php is dated 2011. This is from looking at the files via FTP.

    Upload those to root and overwrite the current ones… Backup the new ones though!

    Okay, where would I get a better version of those files to overwrite?

    Drew Jaynes


    WordPress Core Developer

    If you’re looking to replace wp-config.php with a new one, you can rename wp-config-sample.php. Your .htaccess file is usually generated via Settings > Permalinks unless you have custom stuff in there.

    Thanks for your patience with a newbie. I can rename and upload the wp-config-sample.php. Can I just move the .htaccess file somewhere else and let it automatically be generated? Since I’m locked out of the backend I can’t see the menu you’re referencing.

    Drew Jaynes


    WordPress Core Developer

    If you’re still locked out of the backend, try just renaming your existing .htaccess file to something like OLD.htaccess. This would also go for if you have an .htaccess file located in your wp-admin directory.

    Okay, I now know that the issue which causes me to be locked out is the table prefix line in the wp-config file. When that’s set to the default _WP, it thinks this is a brand new site and completes the update for me. And my entire web site disappears. When it’s set to the real table prefix it locks me into the loop again.

    Where can I go from here?

    And a new development – I renamed OLD.htaccess back to .htaccess and tried to let WP complete the update again. This time instead of the grey screen I got:

    “Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Apache Server at Port 80″

    It’s a nightmare this one tbf. Any chance of starting a fresh install of WordPress or do you have a million pages/posts? 😛

    I can’t do a reinstall. I have weveral years of posts, and this is my company page. I think this must be the section of code from upgrade.php that is causing my problem. Any advice on how I can modify it to let me back in? I’m not a programmer.

    <?php else :
    switch ( $step ) :
    	case 0:
    		$goback = stripslashes( wp_get_referer() );
    		$goback = esc_url_raw( $goback );
    		$goback = urlencode( $goback );
    <h2><?php _e( 'Database Update Required' ); ?></h2>
    <p><?php _e( 'WordPress has been updated! Before we send you on your way, we have to update your database to the newest version.' ); ?></p>
    <p><?php _e( 'The update process may take a little while, so please be patient.' ); ?></p>
    <p class="step"><a>"><?php _e( 'Update WordPress Database' ); ?></a></p>
    	case 1:
    			$backto = !empty($_GET['backto']) ? stripslashes( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';
    			$backto = esc_url( $backto );
    			$backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/');

    [Please use the code button or backticks when posting code]

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Locked out of Backend’ is closed to new replies.