Categories
WCSCV WordPressaside

Researching WP_Query Tutorials


Current Status
  • Listening to: "Tenderness" by "General Public" on "All The Rage"
Categories
WordPress

Renewing the SSL Certificate on a Digital Ocean WordPress Droplet

My certificate expired today and I just happened to find the right command to renew it seamlessly.

As root run the following command and replace example.com with your domain name.

# certbot --apache -d example.com -d www.example.com

Scorce: https://marketplace.digitalocean.com/apps/wordpress

Categories
WordPress

Force WordPress to remember you for a longer period of time than 14 days

A co-worker asked if it was possible to ask WordPress to keep an active session longer than one day or 14 days if you click the “Remember Me.”

Which brought to a post on WordPress Development Stack Exchange where Alex Mills ( Viper007Bond) had solved this problem a year ago. This serves as a reminder of how important he was to the WordPress community. I frequently stumble upon his answers and no longer have the opportunity to thank him for taking the time.

// Extends user session to one year
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );

function keep_me_logged_in_for_1_year( $expirein ) {
    return 31556926; // 1 year in seconds
}

I find the code hilarious in that it would extend period for a year which is clearly excessive. I’m sure he meant that as a joke. 😀