Skip to content

Instantly share code, notes, and snippets.

@ferdisahin
Last active April 19, 2021 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferdisahin/cc501e8f2c03adccb2b9d4468aa5907e to your computer and use it in GitHub Desktop.
Save ferdisahin/cc501e8f2c03adccb2b9d4468aa5907e to your computer and use it in GitHub Desktop.
Wordpress Admin Şifresini Kolayca Değiştirme!
Wordpress panelinde unutulan şifre için bu küçük dosyayı kullanabilirsiniz.
İlk olarak wordpress'in kurulu olduğu klasörde wp-pass.php oluşturun.
Oluşturduğunuz wp-pass.php dosyasının içine aşağıdaki içeriği kopyalayın.
Daha sonra siteadresi.com/wp-pass.php?pass=şifreburada şeklinde girin. (şifre burada yazan yere kendi şifrenizi yazın)
Bu işlemi yaptıktan sonra şifreniz değişecek ve ekrana uyarı basacaktır. Yeni şifreniz ile admin hesabınıza giriş yapabilirsiniz.
<?php
require_once 'wp-load.php';
$pass = isset($_GET['pass']) ? $_GET['pass'] : null;
if($pass){
global $wpdb;
$pass = wp_hash_password($pass);
$id = 1;
$table_name = $wpdb->prefix."users";
$ok = $wpdb->query( $wpdb->prepare("UPDATE $table_name
SET user_pass = %s
WHERE ID = %s",$pass, $id)
);
if($ok){
echo 'Şifre değişti!';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment