Adding admin for specific users

You can use add_role function : add_role( $role, $display_name, $capabilities ); Just set your custom values as you wish : add_role(‘basic_contributor’, ‘Basic Contributor’, array( ‘read’ => true, // True allows that capability ‘edit_posts’ => true, ‘delete_posts’ => false, // Use false to explicitly deny )); Plugin : https://wordpress.org/plugins/user-role-editor/

Communicating to plugins from webserver

The php code at apache, and therefor wordpress, is executed only as a response to an http request, therefor you can not “wait for event” the way you try to do. You will either have to trigger the required action via http, a specifically crafted URL for example, or load wordpress from the CLI, and … Read more