The role of one of my users who has admin role will be changed automatically a few times every day and I have to manually update it again. I'm not sure if it's a plug-in problem but this is the only admin user that the role will be updated automatically. Is there anyway that I can see the logs to find what's wrong? Is there any code that I can put on function.php to change the role to admin for that user of the role was changed as a temporarily fix?
I have had this issue with User Role Editor and Admin Menu Editor. Worth disabling these if you have either of them installed?
Related
I'm working on an old WordPress site and cleaning out all the old dusty plugins and whatnot(Updated or removed any unneeded plugins/themes). Nothing unusual. I added security to the login and other precautions, but about a month ago I received a notification to my admin email that someone created an account and changed their password.
When I investigated, the new user had admin rights and some random username. I immediately deleted the user and soon discovered that the Membership checkbox in Settings was toggled to "Anyone can Register". The default role set to Admin. I had never seen anything like this before, but I couldn't recall if I checked this setting when I started working on the site.
So I unchecked the box, set the default role to subscriber. I chalked it up to me missing a step and moved on. Fast forward to now and over the weekend it happened again. A new user, changed password, and there low and behold the Membership checkbox was checked. I deleted the new account as before.
Although this time the default user was still set to subscriber. So that didn't change.
I tried to Google this, but I don't get anything other than the steps I've taken.
A couple of quick details; the site is backed up, and I am the only admin user. WordPress 5.8.2. PHP 7.4, all plugin updates done automatically.
If you have an idea of what's happening please let me know.
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/
I started working on a wordpress page that was not finished by the previous developer, the problem is that when i open the page, it show every post like this
[mk_page_section bg_image=”http://ladietamigliore.it/wp- content/uploads/2016/04/adriani_magro.jpg” bg_position=”center center” bg_stretch=”true” min_height=”600″ sidebar=”sidebar-1″][vc_column][vc_row_inner][vc_column_inner][vc_empty_space height=”120px”][/vc_column_inner][/vc_row_inner][vc_row_inner][vc_column_inner width=”1/2″][vc_images_carousel images=”446,447,448,449,450″ img_size=”full” onclick=”link_no” mode=”vertical” autoplay=”yes” hide_pagination_control=”yes” wrap=”yes”][/vc_column_inner][vc_column_inner width=”1/2″][mk_padding_divider size=”200″ visibility=”hidden-sm”][vc_column_text]
i think that a plugins is not installed or that an update is missing, so i go to the wp-admin and it look like this
there is not option for post or anything, whats wrong? how can this be fixed?
Apparently that user doesn't have any admin rights - a "real" admin would have to change your user "role" in the user profile in order to give you access to all admin actions.
It looks like your user is not an Administrator, you can check this by going to /wp-admin/users.php and looking at the 'Role' column. If you have access to the Db you can run the below SQL query for updating an user role as administrator. Here I’m assuming user id as 2.
[sql] UPDATE wp_usermeta SET meta_value=’a:1:{s:13:"administrator";b:1;}’ WHERE user_id=2 AND meta_key=’wp_capabilities’
[/sql]
your and not getting all option because you are account don't Administration access. so you have to get administration access
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.
I try to create a new user to post events, but my new user, called admin, doesn't have the ability to post. I tried changing his role to Editor, Subscriber, Author, and Contribute, but I still cannot post with admin.
Currently only the Administrator can post, how can I give admin the rights to do so as well?
I think your new user role has some limitations.
To change the settings of a user role you can use the
user role editor plugin.
To change the admin menu you can use the adminimize plugin.
Follow the instructions of these plugins to customize your new user roles and their access capabilities.