WordPress MultiSite Active Directory integration and site privacy

Try a different approach. Instead of using plugins, I suggest modifying wordpress a little as described in the following answer. https://stackoverflow.com/a/39195424/3157038 So in your case you should setup the wordpress installations like this: mysite.com root: */domains/mysite.com/public_html db: user_mysite table prefix: root_ mysite.com/itsupport root: */domains/mysite.com/public_html/itsupport db: user_mysite table prefix: itsupport_ than in addition to the configuration … Read more

Cookies in multisite where network sites have their own domain name

First Clear Browser Cache (including cookies) + server cache from cache plugins etc. Then set the following in your wp-config.php file: define(‘ADMIN_COOKIE_PATH’, “https://wordpress.stackexchange.com/”); define(‘COOKIE_DOMAIN’, ”); define(‘COOKIEPATH’, ”); define(‘SITECOOKIEPATH’, ”); Also, you may checkout the answer from HERE: define(‘WP_ALLOW_MULTISITE’, true); define(‘MULTISITE’, true); define(‘SUBDOMAIN_INSTALL’, false); define(‘DOMAIN_CURRENT_SITE’, ‘your-domain.com’); define(‘PATH_CURRENT_SITE’, “https://wordpress.stackexchange.com/”); define(‘SITE_ID_CURRENT_SITE’, 1); define(‘BLOG_ID_CURRENT_SITE’, 1); define(‘SUNRISE’, ‘on’); If it … Read more

Moving a WP Multisite to a subdirectory

I know it’s old but I fixed it! i installed WP MU in a subfolder. htaccess: RewriteEngine On RewriteBase /YOUR_SUBFOLDER RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule … Read more

How to disable a network enabled plugin for just one site?

You can use the filter site_option_*. E.g. the following will disable akismet on blog with id 2. add_filter(‘site_option_active_sitewide_plugins’, ‘modify_sitewide_plugins’); function modify_sitewide_plugins($value) { global $current_blog; if( $current_blog->blog_id == 2 ) { unset($value[‘akismet/akismet.php’]); } return $value; }

Can i merge 2 new WP_Query($variable) ‘s?

You won’t do much good just merging the arguments, you need to merge the resulting posts array and the post_count count. This works for me: //setup your queries as you already do $query1 = new WP_Query($args_for_query1); $query2 = new WP_Query($args_for_query2); //create new empty query and populate it with the other two $wp_query = new WP_Query(); … Read more

restore_current_blog() vs switch_to_blog()

After every instance of switch_to_blog() you need to call restore_current_blog() otherwise WP will think it is in a “switched” mode and can potentially return incorrect data. If you view the source code for both functions you will see those functions push/pop data into a global called $GLOBALS[‘_wp_switched_stack’]. If you do not call restore_current_blog() after every … Read more

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