Is it possible to fix/repair all Index, Primary Key, Unique (and all other) structure of a WordPress MS Database

Yes the issue is due to the auto increment setting. All WordPress DB specifics can be found here, which includes details on which ones use auto increment: https://codex.wordpress.org/Database_Description This isn’t going to be an easy task, but here’s some sites to help you: https://www.photographerstechsupport.com/tutorials/fixing-wordpress-indexes-foreign-keys-and-auto_increment-fields/ This one is specific to wp_options: https://guides.wp-bullet.com/fixing-wp_options-table-missing-unique-column-primary-key/ Specifically the auto increment: … Read more

Multisite Installation: how do I setup global search?

I think the best way to do it is to index all the posts and search through them in database. This method should be the fastest when you perform a search because you can filter posts, create the pagination etc. Check this tutorial https://rudrastyh.com/wordpress/search-across-wp-multisite.html Another way is to to something with switch_to_blog() function – I … Read more

Restrict the user access in multi site for non-assigned blogs

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(); $allowed = false; $blogs_of_user = get_blogs_of_user( $user->ID ); … Read more

Global Parent theme for all sites

Create a separate directory and a (sub) domain for your themes. Lets say the domain is themes.example.com, and the directory is /extra/wp-themes/. Now let all your installations use the new theme root. Or just do the same for plugins to manage all plugins from one place too. Registering a new theme root is not possible … Read more

when using add_user_to_blog getting error “Call to undefined function get_userdata”

get_userdata() is a pluggable function, you can find its declaration in wp-includes/pluggable.php. That means, plugins can declare it earlier, and it is not declared, when a plugin is loaded. When you look at wp-settings.php, you can see the load order: // Load active plugins. foreach ( wp_get_active_and_valid_plugins() as $plugin ) include_once( $plugin ); unset( $plugin … Read more

What are the differences in capabilities between the super-administrator and administrator?

The super_admin has access to all admininstrator APIs and also the multi-site functions. If you go to the codex page, it will say so: http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table You can find the multisite functions here: http://codex.wordpress.org/Function_Reference#Multisite_functions If you want to do a more fine-grain investigation of what it can call, I suggest you get familiar with the WP … Read more

Tax_query not working on multisite

I found out that in order to query wp posts via custom taxonomy, from a blog 1 to another blog 2, you have to register that custom taxonomy in both blogs, otherwhise it won’t work. this is strange but true! anyways it works fine now.

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