Odd Script File Trying to be Loaded

In Network Admin > Settings > Domain Mapping > Domain Options, uncheck Remote Login. That should also remove it. In my case, the “script” just retrieves the home page (html), causing a script error and a lot of wasted resources on every page view. Similar complaints in Does Domain Mapping plugin insert javascript on headers?.

Multisite – how to remove the root ‘/’ site?

I use on the root site a small theme for redirect to the languages. A very small theme for locate the language of the users and redirect to the blog of this language. <?php // Browsersprache ermitteln function lang_get_from_browser($allowed_languages, $default_language, $lang_variable = NULL, $strict_mode = TRUE) { // $_SERVER[‘HTTP_ACCEPT_LANGUAGE’] verwenden, wenn keine Sprachvariable mitgegeben wurde … Read more

Hide a theme on list of themes in wp-admin without editing core files

The following filter works in Multisite in the following screens: /wp-admin/network/themes.php /wp-admin/network/site-themes.php?id=1 (individual sites allowed themes) add_filter( ‘all_themes’, ‘wpse_55081_remove_themes_ms’ ); function wpse_55081_remove_themes_ms($themes) { unset($themes[‘Twenty Ten’], $themes[‘Twenty Eleven’]); return $themes; } For the regular theme selector in a single site or sub-site of a network /wp-admin/themes.php (Appearance -> Themes), looks like there’s no hook… Manipulate list … Read more

Adding capabilities to super admins

Although this isn’t well documented, “Super Admin” is not a role (in that it is not an actual role object). It’s more like a special “status”. A list of users who are Super Admins (also called “network admins” or “site admins”) are stored in a database site-option record called site_admins. Generally, adding a capability to … Read more

Multisite database upgrade SSL error

If possible, you should try and fix the cause of this error – invalid SSL certificates. But there are some instances where this is not possible or desirable. One obvious one being development sites using a self-signed SSL certs. One way around this is to set $ssl_verify to false before line 1161 of wp-includes/class-http.php: curl_setopt( … Read more

Multisite 404 errors and non-www redirecting to home page

There is currently a bug in the functionality that handles the NOBLOGREDIRECT constant, which causes 404 errors on the main site to be redirected to the value of the constant. Apparently this is the expected behaviour for sub-directory networks (example.com/subsite), but should not take place on subdomain networks (subsite.example.com). There is a WordPress Trac ticket … Read more

Multisite: Develop locally using production images with .htaccess

The following .htaccess to rewrite example … RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ RewriteRule ^(.*)$ http://example.com/$1 [QSA,L] Just to note… this will result in an external redirect (as if R=302 was included on the RewriteRule directive), not simply a “rewrite” (as is suggested) – even without the R flag. So, the browser will issue two requests for every … Read more

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