WordPress Tips

Update WordPress Password with MariaDB/MySQL:
WARNING: If you do not specify which row you are updating you will change the password for all users!

Allow update without ftp login – Add these two lines to the bottom of the wp-config.php file:

/* Allows update without login */
define('FS_METHOD', 'direct');
  1. Open up your wp_users table and identify the ID associated with the user_name you need to modify.
  2. Run SQL (where 99 represents the ID of the user !USE the correct ID!):
    UPDATE wp_users SET user_pass = MD5(‘thePassword’) WHERE I =99;

Getting WordPress page name (slug) with PHP Code:
$pagename = $wp_query->queried_object->post_name;
echo $pagename; // Output wordpress page name – can be useful for loading custom js and css by template

Remove all active plugins from database:
DELETE FROM wp_options WHERE option_name = ‘active_plugins’;