Assign your clients the “Editor” role in WordPress, but give them capability to act like an administrator, without letting them screw up your Pages. This example lets the Editor add and delete users, but stops them from editing the Pages you created for them. In addition, this example gives Authors the capability to create their own categories, in case your client (the ‘Editor’) wants to delegate some responsibility for posting to an ‘Author’.
$edit_editor = get_role('editor'); $edit_editor->add_cap('list_users'); $edit_editor->add_cap('add_users'); $edit_editor->add_cap('delete_users'); $edit_editor->remove_cap('delete_others_pages'); $edit_editor->remove_cap('edit_others_pages'); $edit_author = get_role('author'); $edit_author->add_cap('manage_categories');
See more: WordPress user capabilities