Change WordPress Password using MySQL

If the Forgot password option doesn’t work for you (which it really should), then you can change the password of your self-hosted WordPress login. Check the contents of wp-config.php for the database login. Use that login information for MySQL login. define(‘DB_NAME’, ‘wpdatabase’); define(‘DB_USER’, ‘wpdbuser’); define(‘DB_PASSWORD’, ‘wpdbpassword’); Replacing DB_USER and DB_NAME from that command with the … Read more Change WordPress Password using MySQL

Calculate Date Differences in MySQL

There is a function in MySQL that will calculate the number of days between two given dates:  datediff Example mysql> select datediff(‘2014-06-09′,’2014-07-07’); +———————————————-+ | datediff(‘2014-06-09′,’2014-07-07′) | +———————————————-+ | -28 | +———————————————-+ 1 row in set (0.00 sec) Calculate Days Between Now and Specific Date mysql> select datediff(now(),’2014-07-01′); +——————————+ | datediff(now(),’2014-07-01’) | +——————————+ | 6 | … Read more Calculate Date Differences in MySQL