New answers tagged

3

As far as I remember the users in multisite are shared. They are tracked in one database table and use same cookie for authentication. The more practical approach is to track not merely login status, but capabilities. Users should be exposed to actions/information that they can perform/see, according to their Role on specific site. You don't cover your use ...


0

You can find the various recommended .htaccess configurations on the Codex's .htaccess page. Here's the one for subdirectory Multisite later than WordPress 3.5: RewriteEngine On RewriteBase / 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 ...


0

It appears that the $wp->request that suggested in the above reply is always an empty string (in WPMS 4.5.2), so instead you can check this against is_main_site();.


1

I believe you're looking for the network_admin_menu hook. The Codex page for network_admin_menu has the following example: add_action('network_admin_menu', 'function_name'); function function_name() { add_menu_page( "page_title", "menu_title", 'capability', 'menu_slug', 'function_callback' ); }


0

If you've got your posts separated by categories, then you should be able to make an export file for each category. On the Tools ยป Export screen, you can opt to export only the posts in a given category. Make sure you rename each file as needed when you're doing your exports. Then, once you've got your new Multisite installation set up, and have created ...


0

I don't always outsource my work, but when I do, I hire people in the USA. Have you considered outsourcing this small task on Freelancer? I bet there is a dude out there that'll solve your problem for $5 - $20. I remember, briefly, I messed around WPMU + LEMP Stack and the sunrise file was required. Check out the WPMU Plugins and scout out the ...


0

You should activate debug inside your wp-config.php file. Also, consider browsing the plugin directory for WPMU. They have tons of multisite plugins and I think one of them is what you may be looking for.


1

I know this is an old question but get_current_site_name() has been deprecated; use this get_current_site()->site_name or get_current_site()->domain for the domain without the text "Sites" at the end.


-1

Add this: define( 'PLUGIN_DIR', ABSPATH . '/ext' );


1

There are a few options for this: Premium Plugins: This works well to help multisite set ups hide sites and gives you a few ways to do it - but it is not free: https://premium.wpmudev.org/project/sitewide-privacy-options-for-wordpress-mu/ a good "coming soon" and "maintenance mode" plugin: https://www.seedprod.com/ Open Source Plugins: ...


1

is_user_logged_in() is a pluggable function, which means you can override its functionality. That's probably where I'd start. Something like this may do what you're looking for. This is untested code and comes with no warranties of any kind. function is_user_logged_in() { $user = wp_get_current_user(); $current_blog_id = get_current_blog_id(); ...


1

There is actually nothing unique about setting multisite on XAMPP, all you need to do is properly configure the webserver as a proper webserver, and skip the lazy practice of using localhost as your site domain. Select some random domain you are not likely to use in your web use, edit your hosts file to point that domain to 127.0.0.1, and set the vhost in ...


2

get_option is a per sub-site function. In other words it gives you only the value of the option in the sub-site. If you want to have a netwrok wide option you should use get_site_option and update_site_option. You can also query an option from a specific sub-site by using get_blog_option and passing as parameter to it the main sub-site id, but in my ...


3

This doesn't sound like something coming from WordPress core. Quick search online got pretty slim results, but it seems to be asscociated with WP All Import plugin.


-2

If you want to cheat, change in IWPAdminPanel_v2.7.1.1\IWPAdminPanel_v2.7.1.1\install\installFunctions.php the following lines to: 270 -> $check['available']['PHP_MAX_EXECUTION_TIME_CONFIGURABLE'] = 1; 284 -> $check['final']['PHP_MAX_EXECUTION_TIME_CONFIGURABLE'] = ($check['required']['PHP_MAX_EXECUTION_TIME_CONFIGURABLE'] == ...


-2

Try to set the WP_DEBUG constant to true in wp-config.php file to get any errors shown in your browser. Also, you may want to check the network has been setup correctly - double check you have followed the steps here - http://codex.wordpress.org/Create_A_Network


0

The api does support it, but not with the obvious wp_create_user. You need wp_insert_user.


0

Here is an example authentication plugin. It will pull information from your php session variables. This is how to use it: save it into a file mycustom-auth.php modify the constants near the top of the class put it into wp-content/plugins/mycustom_auth or wp-content/mu-plugins enable it in wp-admin log out of WP and log in again. You should see one ...


1

WordPress's authentication system is made up of pluggable functions, which means that you can write a plugin that has a function named, say, wp_authenticate(), and your site will use your wp_authenticate() function instead of the native WordPress one. Your comment about is_user_logged_in() (on your original post) is obviated by the fact that ...


0

To get Blog ids you can use: $blogs = wp_get_sites (); $blogs_id = array(); foreach ($blogs as $blog) { $blogs_id [] = $blog["blog_id"]; } instead of: global $wpdb, $blog_id, $post; $blogs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM wp_blogs ORDER BY blog_id" ) );


0

A WordPress multi-site or "network" would fit your need exactly. One thing to point out based on your example. You may only choose sub domain or sub folder installation. WP multi-site is not geared to do both by default, you must choose one or the other at setup. The setup is surprisingly simple: http://codex.wordpress.org/Create_A_Network Regarding ...


1

I'm not completly sure but as far as I know that should work with the plugin "WordPress MU Domain Mapping"


1

Is using Auth0 (http://www.auth0.com) maybe an option for you? They have a very good Wordpress plugin. I think you could integrate your system and do a Single Sign On (SSO) using the plugin. I think it's a better option for you to do some stuff on your system to integrate (since you know the system and can probably be more productive), using this ...


0

The link provided by Christine Cooper has a great answer. There are many ways, and you can look through the plugin WP Latest Posts for code, too. Start by looking at the get_last_updated function. WordPress provides get_posts as the basis to retrieve posts, even across a network. In addition, take a look at switch_to_blog() to pull from the across the ...



Top 50 recent answers are included