Skip to content

Instantly share code, notes, and snippets.

View kowsar89's full-sized avatar

Md Kowsar Hossain kowsar89

View GitHub Profile
@kowsar89
kowsar89 / autologin.php
Last active November 9, 2026 17:56
Auto login as WordPress Admin
<?php
include('wp-load.php');
$user_id = 1; // Assuming admin user id is 1
wp_set_current_user($user_id);
wp_set_auth_cookie($user_id);
if ( is_user_logged_in() ) {
header('Location: '.admin_url());