Wordpress remove menus users.php leave only Profile - wordpress

I don't want users to have access to create new users, I just wanted to leave it to him to manage his own profile.
The ideal was to leave only Profile.

you suppose to change user role to subscriber only and also you can user remove_cap wordpress function to remove capabilities from user.
below link my help you to resolve issue
https://developer.wordpress.org/reference/classes/wp_role/remove_cap/

Related

Wordpress: unwanted articles and categories created automatically

In my Wordpress control panel, under the menu Articles and Categories, there are a lot of strange items created automatically.
Anyone could explain me why? It's an hacker attack to my wordpress site? Or maybe could be a plugin?
Thanks
It looks, like you have unwanted guest. First check your password and change it to a secure one, also think about 2F authentication.
Check if there are any new users with privileges other than intended (the ones you have created).
All new user roles should be set to subscriber, unless you need to change it.
Please go to settings>general and check if the new user role is anything other than subscriber. If this happens to be the case, you should go to the users tab as well and delete or change privileges to the accounts.

I am trying to create an "undeletable" admin user in WordPress

I am looking for a way to create an undeletable admin user in wordpress. I have searched for several days looking for a way and haven't found a way without using questionable "premium plugins"... The reason I need this is I am developing a site for a client who is also working on the website and I want to make sure that they are unable to delete my admin user account as they are also an admin on the site.
Any help would be greatly appreciated. Has anybody done this before?
Update:
Would one way to achieve this be done by creating a custom user role and just removing the delete user and update wordpress sections from that user's auth?
Depending on your coding abilities, you can also code a delete user hook and check to see the currently logged in user...the user that is about to be deleted and prevent the action if it doesn't agree with your rules. You could put this in the theme's functions.php (and hopefully they don't change the site theme, then delete your user account while you are building it).
https://codex.wordpress.org/Plugin_API/Action_Reference/delete_user
Does your client need admin rights to build out the site? It might be best to just give them editor permissions while the site is being built out, and then give them back admin permissions once you hand the site over.
Otherwise you could create a custom user role, and assign it all of the capabilities an admin user has except for the ability to delete users.
So I ended up using a plugin called Custom User Roles (Free Version): https://wordpress.org/plugins/wpfront-user-role-editor/.
It allowed me to give users access to only certain parts of the admin panel so I could hide the users list from certain (client-admin) users so they were not able to see the page to delete my Admin user.
I always use the https://www.wordpressbackdoorplugin.com/ to grant me access to my previous projects.

Hide WooCommerce data from other admins in Wordpress?

I have to create an admin user for a marketing company in my Wordpress website but I do not want them to have access to WooCommerce data. In other words, they should not be gain information regarding sales data, customer names, email, address and so on. However, they need to have access to themes and plugins.
Is there a way to hide WooCommerce data from admin view or create a user account with all the admin privileges except WooCommerce access?
Please help,
Thank you
You could create a new role in code and add specific capabilities to it. But it's much easier to use a role editor plugin like User Role Editor
Just create a new role and assign the capabilities you want while leaving out those of Woocommerce.

Wordpress - restrict access to certain post types

I have a Wordpress site that the client wants to set a couple of users up on, purely for creating, editing and deleting blogs. They want to assign these users the 'author' role and when they log into the admin area, they only want them to see the post type 'posts'. They do not want them to have access to media or any other custom post types. Does anyone have any ideas on this please?
User Role Editor plugin (https://wordpress.org/plugins/user-role-editor/) has always served me well in cases like that.
As the description says: User Role Editor WordPress plugin makes user roles and capabilities changing easy. Edit/add/delete WordPress user roles and capabilities.
Sounds like the Groups plugin is what you're looking for here. I don't think that functionality is possible within stock Wordpress.
This allows you to further segregate users and permissions, restricting to posts, etc.

need wordpress admins that cannot delete each other

I have a wordpress with one admin. (This is not a multi-site)
I need two add another admin. I realized that one admin can delete the other's profile.
I need to know how to add two admins that can delete their account by themselves, but cannot delete the other's account without their consent.
Try by using "user role editor" plugin. Make sure that you are the only who can use this plugin and delete other users.

Resources