Multiple WordPress on Virtual Host

Thanks for comments. I can manage to host two separate WordPress site on VirtualHost EC2 Linux AMI. My mistake is I have created the vhost.conf file in under /etc/httpd/conf.d. Correct way to enable VirtualHost on EC2 Linux AMI is as follow : go to /etc/httpd/conf open httpd.conf file go to end of file uncomment NameVirtualHost … Read more

Is there a way to add a function that will get run after a blog is created?

Have you tried the action ‘wpmu_new_blog’ . The docstring for the function ‘wpmu_create_blog’ says: This function runs when a user self-registers a new site as well as when a Super Admin creates a new site. Hook to ‘wpmu_new_blog’ for events that should affect all new sites. wpmu_new_blog is called with the following parameters: do_action( ‘wpmu_new_blog’, … Read more

load styles and scripts in network admin not working

A bit of research on here and it seems I was trying too hard. I have found the following solution. Props to this answer. // Create admin page navigation listings function bf_carrier_admin_network() { $hook_suffix = add_submenu_page(‘settings.php’, ‘Carriers’, ‘BrightFire Carriers’, ‘edit_posts’, ‘ins-carrier-edit’, ‘carrier_admin_network’); add_action( “load-{$hook_suffix}”, ‘bfc_styles_scripts’ ); } add_action(‘network_admin_menu’, ‘bf_carrier_admin_network’); function bf_carrier_admin_display() { if (current_user_can(‘manage_options’)){ $hook_suffix … Read more

Plugin data shared in Multisite

You are asking a question that is specific to a plugin and not WordPress. How the plugin functions depends entirely on the plugin author’s design. Reading the article above, sure the plugin works in WP multsite, but as the author mentions extra works needs to be done to share that content among other mulisite sites. … Read more

How to set the default options on an existing plugin in a WP MU new user install

At the top of the api.php page before the class JSON_API line add the following code: add_action( ‘wpmu_new_blog’, ‘wpse_set_defaults’ ); function wpse_set_defaults( $blog_id ) { global $json_api; switch_to_blog( $blog_id ); // set the default controllers here $required_controllers = explode(“,”, “categories,posts,user,attachments”); $id = ‘json_api_controllers’; $available_controllers = $json_api->get_controllers(); $active_controllers = explode(‘,’, get_option($id, ‘core’)); $action = “activate”; foreach … Read more