How to Block a WordPress User Without Deleting Their Account

0
31

Do you need to block a WordPress person out of your weblog?

The easiest method to obtain that is to delete their person profile, however this can take away them utterly out of your web site.

In this text, we’ll present you the way to block or disable a WordPress person with out deleting their account.

How to Block a WordPress User Without Deleting Their Account

When You Shouldn’t Delete a User Account

The easiest method to block a person in your WordPress website is by merely deleting their person account.

However, deleting a person account in WordPress requires you to assign all their content material to one other person. This will change the author information for these articles.

One manner to cope with this difficulty is to change the person’s password and e-mail deal with by modifying their person profile. This will block their entry, and so they will be unable to log in. However, this will even change their Gravatar image.

The potential to disable a person with out deleting their account is very useful on multi-author blogs, boards, in addition to community sites.

Now, let’s take a take a look at how one can simply block a WordPress person with out deleting their person account. We will cowl three strategies, and you need to use the fast hyperlinks beneath to soar to the tactic you need to use:

Method 1: Blocking a User by Downgrading Their Role

Your WordPress web site comes with a highly effective user management system that permits you to assign completely different roles to every person.

One manner to block a WordPress person is to downgrade their position. This gained’t cease them from logging in to your WordPress web site, however it would prohibit what they will do after they log in. If you don’t need them to have the opportunity to log in in any respect, then you must use Method 2 or 3 as a substitute.

Downgrading the User Role to Subscriber

You might downgrade the person’s position to Subscriber. Once they log in, they are going to be given restricted entry to the WordPress admin space. They will solely have the opportunity to change their person settings, similar to their identify and admin coloration scheme.

Users With the Subscriber Role Have Very Limited Admin Access

However, this may be a drawback if the person has written posts in your web site. If they need to trigger hassle, then they will change their identify to one thing offensive, and it will likely be displayed on all of their posts in your web site.

Downgrading the User Role to ‘No Role for This Site’

A greater position to give customers you would like to block is ‘No role for this site’.

When they log in, they won’t be directed to the admin space. If they struggle to navigate there, then they are going to be proven an error message stating that they don’t have entry.

Users With 'No Role For This Site' Have No Admin Access

First, head over to the Users » All Users web page of your admin space.

Next, you want to click on the ‘Edit’ hyperlink below the person you would like to block.

Edit the User from the Users » All Users Page

Now you want to scroll down to the ‘Role’ setting and choose ‘No role for this site’ from the dropdown menu.

After that, you must click on the ‘Update User’ button on the backside of the web page to retailer your settings.

Assign the Role 'No Role for This Site'

The person will now not have the opportunity to entry any admin settings in your WordPress web site.

If you would like to unblock a person sooner or later, then merely observe the identical steps to assign them their earlier position.

Method 2: Blocking a WordPress User With ‘Lock User Account’

Lock User Account is a mild plugin that does only one job. Upon activation, you’re prepared to block customers in order that they will’t log in to your web site.

The very first thing you want to do is set up the Lock User Account plugin. For extra particulars, see our step-by-step information on how to install a WordPress plugin.

Blocking a User

Start by navigating to the Users » All Users web page of the admin dashboard. Once there, you must click on the checkbox subsequent to each person you would like to block.

Select 'Lock' From the Bulk Actions Menu

Next, merely click on the ‘Bulk actions’ button, choose ‘Lock’ from the menu, after which click on the ‘Apply’ button.

Next time these customers attempt to log in, they are going to be blocked and see the error message ‘Your account is locked!’

Locked Users Are Unable to Log In

Unblocking a User

If you would like to unblock the person sooner or later, then merely observe the identical steps however select ‘Unlock’ from the ‘Bulk Actions’ menu.

Changing the Lock Message

You can customise the message that locked customers see when making an attempt to log in to your web site.

You want to navigate to Settings » General after which scroll to the underside of the web page. You will discover a Lock User Account part with a single possibility known as ‘Locked User Message’.

Locked User Account Message

Simply kind the message you need locked customers to see on this discipline, after which click on the ‘Save Changes’ button to retailer the settings.

Method 3: Blocking a WordPress User on Certain Days or Dates

What when you don’t need to block a person completely? Maybe you would like to ban a person for, say, 2 weeks or enable a sure group member to log in solely throughout enterprise hours.

In that case, you need to use the User Blocker plugin. Besides having the ability to block customers completely, it additionally permits you to block them throughout sure occasions on completely different days of the week or over a date vary.

The very first thing you want to do is set up the User Blocker plugin. For extra particulars, see our step-by-step information on how to install a WordPress plugin.

Upon activation, you must navigate to the User Blocker web page in your dashboard. Here, you may select whether or not to opt-in to the User Blocker mailing checklist and share non-sensitive data with the developer to assist enhance the plugin.

Simply click on the ‘Skip & Continue’ or ‘Opt-In & Continue’ button.

Opt In or Skip the User Blocker Mailing List

After clicking a kind of buttons, you will notice the User Blocker settings web page.

There are three tabs, so you may block a person by time, date, or completely. By default, you see the ‘User By Time’ tab.

User Blocker Settings

Blocking a User by Time and Day

With the ‘Block User By Time’ tab chosen, merely place a checkmark subsequent to the identify of all customers you would like to block by time. Alternatively, you may block customers who’ve a sure user role by deciding on ‘Role’ from the dropdown menu.

If your web site has a massive variety of customers, then you need to use the search function to discover them extra simply.

Then within the ‘Block Time’ part, you may enter the occasions you would like to block these customers on every day of the week. You can kind the occasions or select them from a dropdown menu.

User Blocker Day and Time Settings

You can rapidly copy the identical starting and finish time to every day of the week by clicking the ‘Apply to all’ button. The ‘Reset to all’ button will clear all the occasions you entered.

After that, you may scroll down to the ‘Block Message’ part. When a blocked person tries to sign up, they may see a default message. However, if you would like to show a extra custom-made block message, you may kind it right here.

Customize the Block Message

Instead of displaying an error message when a blocked person tries to sign up, you may redirect them to one other web page in your web site, similar to your Terms of Service web page or Privacy Policy. If you’d like to try this, then merely paste that web page’s URL into the field offered.

When you’re pleased with the settings, simply be sure to click on the ‘Block User’ button. The customers you chose will now be blocked from logging in throughout the occasions and days you chose.

By repeating these steps, you may block different customers for various time durations.

Blocking a User by Date Range

If you would like to block a number of customers throughout a sure date vary, then you must click on the ‘Block User By Date’ tab on the high of the display screen.

You shall be in a position to choose the usernames or roles that you just want to block.

Select the Users You Wish to Block by Date

Next, you must scroll down to the ‘Block Date’ part.

You can enter the date and time the block will begin and finish. Simply choose the beginning and ending dates and occasions from the dropdown menus. The time shall be in a 24-hour format.

Blocking a User During a Date Range

You can even add a customized message that the customers will see when making an attempt to log in. Alternatively, you may enter the URL of the web page you would like to redirect them to.

When you’re completed, don’t neglect to click on the ‘Block User’ button.

You can block different customers for various date ranges by repeating the steps above.

Blocking a User Permanently

You ought to be sure to are within the ‘Block User Permanent’ tab, after which you may choose the usernames (or roles) that you just want to block completely.

Choosing Users to Block Permanently

After that, all you want to do is kind a customized message that blocked customers will see after they attempt to log in to your web site.

Or you may depart the field clean, and they’ll see the default message. This says, ‘You are permanently Blocked.’

Permanent Block Message

Or, like the opposite choices above, you may redirect the customers to a net web page fairly than displaying a message. Simply kind the web page’s URL within the ‘Enter Redirection URL’ field.

Now when the blocked customers attempt to sign up, they may see an error message.

Preview of Block Message When Trying to Sign In

We hope this tutorial helped you find out how to block a WordPress person with out deleting their account. You can also need to see our ultimate WordPress security guide or our skilled picks for the best WordPress security plugins.

If you appreciated this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You can even discover us on Twitter and Facebook.



Source link