Error 404 on Network Admin and others

The problem is that your .htaccess rules are referencing a path outside of the document root, which is not allowed in .htaccess files. Here is the complete working code for your .htaccess file. RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f … Read more

Retrieving data from specific multisite blog

You can use the switch_to_blog() function to switch the scope to a specific site and access data from that site: require_once( ‘/path/to/wp-load.php’ ); switch_to_blog( 3 ); $option = get_option( ‘admin_email’ ); restore_current_blog(); Also, you should use wp-load.php when using WordPress API in your own project, not wp-blog-header.php

Multisite development environment

I don’t have any experience with your specific configuration so I can only offer some general advice. But obviously the closer a development/test environment is to the production environment the better. Saves a lot of headache in the long run. If your production environment is already configured and live I’d do everything possible to duplicate … Read more

Embedding screencast.com Videos in WordPress Multisite

Screencast.com has a dedicated GitHub page with hands full of tutorials (no need to clone them over here). You can then utilize wp_oembed_get() or register a new provider using wp_oembed_add_provider(). echo wp_oembed_get( ‘http://example.com’, array( ‘width’ => 1920, ‘height’ => 1080 ) ); Or add the provider: wp_oembed_add_provider( ‘http://screencast.com/*’, // The Format ‘http://screencast.com/’, // The Provider … Read more

How i can get blog info using site url in multi-site

Use get_blog_id_from_url() function to retrieve blog id from url and then use get_blog_option() function to get information for that blog. Example : $blog_id = get_blog_id_from_url(“a.somename.com”); echo get_blog_option( $blog_id, ‘siteurl’ ); echo get_blog_option( $blog_id, ‘blogname’ ); echo get_blog_option( $blog_id, ‘blogdescription’ );

Query users by capability – uninstall/deactivate callback

It was actually much easier than I originally thought – just doing a WP_User_Query for a meta value (meta arrays are supported as well, like for the other query classes). public function on_deactivate() { $meta_key = ‘tools_page_tsi_per_page’; $query = new WP_User_Query( array( ‘meta_key’ => $meta_key ) ); if ( empty( $query->results ) ) return; foreach … Read more

Multi language site with same content

Storing it in a session would certainly be possible, but is not necessary at all. Unless you’re looking for a way to not include the query string in subsequently visited URLs. Here I’d rather go with a cookie than a session, since WP already relies on cookies and does not use sessions. But that’s a … Read more