The requested URL /login was not found on this server

wp-login was not found error clearly means that you have lost control on WordPress admin panel. Even if this situation looks terrible but in real, it’s not. Situation A: The URL might be wrong In most cases, the WordPress installed in its own directory. When a user tries to change the default URL path of … Read more

Can set_transient() be used in multi-site?

As the Codex suggests: Essentially the same as set_transient() but works network wide when using WP Multisite. One difference is that the transient name should be 40 characters or less in length. Also, while set_transient() sets transients that have an expiration time to not autoload, all transients added with set_site_transient will auto-load at all times. … Read more

Use another author.php if different multisite subsite?

This was the solution.. // different author template */ add_filter( ‘template_include’, ‘author_template’, 99 ); function author_template( $template ) { if( !is_main_site() and is_author( ) ) { $new_template = locate_template( array( ‘other-author.php’ ) ); if ( ” != $new_template ) { return $new_template ; } } return $template; }

WordPress Multisite/Network – How to use a subdomain as main blog and subdomain for child sites

There’s a couple of different ways that might work, but both rely on using Apache/NGINX directives. Method 1 Setup WordPress MS at mydomain.com, create an admin.mydomain.com site and then redirect mydomain.com to admin.mydomain.com. All additional sites would naturally be subdomains to mydomain.com. Method 2 This is basically the inverse of Method 1. You should be … Read more

Avoid having infinite loops

Yes it will give you infinite loop, because you’re calling the WP_User::set_role method within the set_user_role action that’s again fired within the the WP_User::set_role method. Not sure what the setup is but you can try to run it only once, with remove_action( current_action(), __FUNCTION__ ); as the first line in your callback, or use another … Read more

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