How to save Admin FTP password

You can save this information on your wp-config.php file: define(‘FTP_HOST’, ‘ftp_host’); define(‘FTP_USER’, ‘ftp_username’); define(‘FTP_PASS’, ‘ftp_password’); More info (WordPress Codex)

How do I create a password reset link?

After much research, I finally turned to examining the WordPress core file wp_login.php hoping that WP would show how they do it in a non-obtuse manner. From the information around line 331 (WP 4.6.1), I put together the following code. <?php global $gw_activate_template; extract( $gw_activate_template->result ); $url = is_multisite() ? get_blogaddress_by_id( (int) $blog_id ) : … Read more

Password protecting a page

One solution would be to create a custom Page template for Pages that you intend to password protect. Start by creating your custom Page template, perhaps named template-password-protected.php, and add the Template: file-docblock tag at the top, like so: <?php /** * Template: Password-Protected */ ?> Now, add your basic Page template markup: <?php /** … Read more

Enforcing password complexity

Well, ended up fixing this after hours of banging my head against ones keyboard. Fixed by making the first parameter of my hooked function a value instead of a reference – curious when nearly all hooks in wordpress pass the error object by reference! function validatePasswordReset( &$errors, $userData ) { return validateComplexPassword( $errors ); } … Read more

Password Reset for Users on a Multisite Subsite

This works well! “By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.” <?php /** * Plugin Name: Multisite: Passwort Reset on Local Blog * Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb * Description: By default, WordPress Multisite uses the main blog for passwort … Read more

Password Protect Custom Page

When you select password protected option in page back-end, It by-default works for content only. i.e. the_content() But if you want to password protect whole page or have a custom template, you need to have the following structure. <?php global $post; get_header(); if ( ! post_password_required( $post ) ) { // Your custom code should … Read more

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