How to Create a Admin User for A WordPress Site via MySQL (PHPMyAdmin)?

You need to run those below queries- INSERT INTO `your-wp-database`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`, `display_name`) VALUES (‘1000’, ‘your_username’, MD5(‘Str0ngPa55!’), ‘your_username’, ‘[email protected]’, ‘0’, ‘User Display Name’); INSERT INTO `your-wp-database`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, ‘1000’, ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;b:1;}’); INSERT INTO `your-wp-database`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, ‘1000’, ‘wp_user_level’, ’10’); But notice here your-wp-database … Read more

Check Password Strength using WordPress API

WordPress uses the zxcvbn javascript library by Dropbox, to estimate the password strength. We can see the implementation in: /wp-admin/js/password-strength-meter.js /wp-admin/js/user-profile.js with: strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputBlacklist(), pass1 ); As far as I know there’s no explicit PHP WordPress API for estimating the password strength, but zxcvbn has been ported to a PHP library here, … Read more

post_password_required() not recognizing cookie set with correct password

Figured it out! The new version of WordPress (3.4) changed the way the password protected pages worked. This should work for you now: <?php if ( post_password_required() ) { ?> <form method=”post” action=”/wp-login.php?action=postpass”> <p>This content is password protected. To view it please enter your password below:</p> <input type=”password” style=”margin:10px 0;” size=”20″ id=”pwbox-<?php the_ID(); ?>” name=”post_password”/></label><br/> … Read more

Change Password Strength Indicator names?

Adding this to my function.php file in the child theme folder did it for me: add_action( ‘wp_enqueue_scripts’, ‘my_strength_meter_localize_script’ ); function my_strength_meter_localize_script() { wp_localize_script( ‘password-strength-meter’, ‘pwsL10n’, array( ’empty’ => __( ‘But… it\’s empty!’, ‘theme-domain’ ), ‘short’ => __( ‘Too short!’, ‘theme-domain’ ), ‘bad’ => __( ‘Not even close!’, ‘theme-domain’ ), ‘good’ => __( ‘You are getting … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)