Wordpress Backend

Meenakshi Sandle

Active member
Banned User
Apr 9, 2020
162
38
28
31
Chandigarh
www.trendingmantra.com
Hi, I m creating a website (Wordpress) for my client. I need a small help.

I need to embed a REQUIRE PHP code, anywhere in Wordpress Directory, which links to my website. I mean I need to use "REQUIRE" function, connected to my website. So if I wants to STOP the client website from running, I just RENAME the REQUIRE FILE in my server.

I hope you got my point. Please help me.

Meenakshi Sandle
 

MrSam_1

Well-known member
Administrative
Trusted Seller
Dec 1, 2018
24,090
27,353
120
Quick question: why would you want to do that on your clients?
Did it pass trough your mind that he might hire somebody else and every at least medium skilled developer will find the issue and correct/null it?
What are you asking is like a licensing system for whole website.
 
  • Like
Reactions: scillione

bazilbycom

Well-known member
Mar 20, 2020
110
262
63
India
Hi, I m creating a website (Wordpress) for my client. I need a small help.

I need to embed a REQUIRE PHP code, anywhere in Wordpress Directory, which links to my website. I mean I need to use "REQUIRE" function, connected to my website. So if I wants to STOP the client website from running, I just RENAME the REQUIRE FILE in my server.

I hope you got my point. Please help me.

Meenakshi Sandle
i would suggest using a script like license box to make it easier
 
  • Like
Reactions: abhishekkjain

Meenakshi Sandle

Active member
Banned User
Apr 9, 2020
162
38
28
31
Chandigarh
www.trendingmantra.com
Quick question: why would you want to do that on your clients?
Did it pass trough your mind that he might hire somebody else and every at least medium skilled developer will find the issue and correct/null it?
What are you asking is like a licensing system for whole website.

Nice Question. The Thing is I haven't received my Salary from last 3 months. My Senior says they will transfer all the 3 months salary at once. They Said we will receive our salary in the MAY END. but I really DOUBT that. Thats why I want this.. Pl suggest me anything this kind of script or else..

Thank you so much.
 
  • Like
Reactions: merazuk

TassieNZ

Premium Uploader and Sometimes Hacker!
Jan 17, 2019
9,017
19,812
120
New Zealand
Nice Question. The Thing is I haven't received my Salary from last 3 months. My Senior says they will transfer all the 3 months salary at once. They Said we will receive our salary in the MAY END. but I really DOUBT that. Thats why I want this.. Pl suggest me anything this kind of script or else..

Thank you so much.
Is this on your hosting? If so you can just suspend the site. If it is on their hosting, then they can access the files anyway and any developer could bypass what you add for protection. Unless you encrypt some files of course!

You need to give more information, then hopefully someone can help.

TassieNZ :)
 
  • Love
Reactions: nakib2k19

Meenakshi Sandle

Active member
Banned User
Apr 9, 2020
162
38
28
31
Chandigarh
www.trendingmantra.com
Is this on your hosting? If so you can just suspend the site. If it is on their hosting, then they can access the files anyway and any developer could bypass what you add for protection. Unless you encrypt some files of course!

You need to give more information, then hopefully someone can help.

TassieNZ :)

No, its not on my hosting. I just want a simple thing... I use REQUIRE php function in their WORDPRESS file. Link will be connected to my Hosting server file...

If they refuse to pay me my salary.. I will change the file name.. So it won't work on their website..
 

abhishekkjain

Member
Oct 7, 2019
81
44
18
So basically, you want to control your client's website using a flag that only you have control to. Now there is something that you can do on front end and something at backend. Either way with little debugging, your client can easily bypass you and have complete control as he owns the code/server.

Frontend: Use Google Tag Manager - (insert scripts from Google's dashboard)
Backend: Make an API at your end, read that API at your client's theme index.php or in wordpress config. Either way it will be slow. So better is to make a switch in client's database and expose an API from his website. Add security salts and then change the value on the fly! Using this, your clients website will not feel slow and at the same time, you will have better control. It would not be easy for your client to figure out how you disabled the site unless he knows git. :p
 

Meenakshi Sandle

Active member
Banned User
Apr 9, 2020
162
38
28
31
Chandigarh
www.trendingmantra.com
So basically, you want to control your client's website using a flag that only you have control to. Now there is something that you can do on front end and something at backend. Either way with little debugging, your client can easily bypass you and have complete control as he owns the code/server.

Frontend: Use Google Tag Manager - (insert scripts from Google's dashboard)
Backend: Make an API at your end, read that API at your client's theme index.php or in wordpress config. Either way it will be slow. So better is to make a switch in client's database and expose an API from his website. Add security salts and then change the value on the fly! Using this, your clients website will not feel slow and at the same time, you will have better control. It would not be easy for your client to figure out how you disabled the site unless he knows git. :p
That is soo much of work.. also it required core knowledge. Hmm..

Its ok leave it. I was thinking.. simple REQUIRE function with does all the job. it's ok my bad.

Anyways thank you everyone for your help.
 

ckeeper

Well-known member
Nov 8, 2019
623
376
63
Do a full backup of the site first on your local first, if they do not pay for your work reset the db to default, once they pay restore the backup. Good luck.
 

MrSam_1

Well-known member
Administrative
Trusted Seller
Dec 1, 2018
24,090
27,353
120
Unethical thing would be to implement a small shell or any other remote access script that can be accessed directly (something like example.com/wp-content/themes/mytheme/includes/myfile.php <- this is only an example, path can be whatever you choose to be where you put the file) and would give you access to site files in case of payment problems. Seen lots of freelancers practicing this on freelance[dot]com.
 

NullMaster

Well-known member
Null Master
Trusted Uploader
Jul 25, 2018
12,062
22,063
120
How to delete that user after created backdoor. I know there is a function
wp_delete_user

but dont know how to use this correctly.
Method 1: Manually Deleting WordPress Users with Specific Roles

This method is simpler and does not require you to install any plugin.


Simply go to the Users page on in your WordPress admin area. You will notice the list of users registered on your WordPress site.


Users page in WordPress



On top of the list, you will see the links to different user roles. When you click on a user role, it will show you the list of users with that specific user role.


This page only displays 20 users at a time. If you have more user accounts that you want to delete, then click on the Screen Options tab on the top right corner of the screen.


This will bring a fly-down menu where you can set the ‘Number of items per page’.


Show more items on the users page



For example, we want to delete users with subscriber user role, and there are 144 users with that role. We will enter 144 in the number of items per page field.


Click on the ‘Apply’ button, and the page will reload showing all user accounts with the subscriber user role.


Now you need to click on the select all checkbox next to the Username column to select all items displayed on the page.


Bulk select users you want to delete



If you don’t want to delete some users, then you can uncheck them now.


Once you are ready, click on the ‘Bulk Actions’ menu and then select ‘Delete’. After that click on the Apply button and WordPress will delete all selected user accounts.


If the user accounts you are trying to delete have created posts, then you will be asked what you want to do with those posts.


Delete or attribute content



You can select to delete all content created by those users or attribute it to an existing user account.


Click on the confirm deletion button to continue.


WordPress will now delete all selected users accounts from your site.


This method will work for a few hundred users, but if you have thousands of users, then you don’t want to adjust the screen options because it can potentially overload your server.


Instead you need to use Method #2.

Method 2: Bulk Delete WordPress Users with Specific Roles Using Plugin

The default way to bulk delete users with specific roles is quite simple. However, sometimes you may need to select users based on other criteria as well.


For example, you may want to delete users that haven’t logged in for a while, or users who signed up during a specific period of time.


In such a situation, the default user management tools will not be enough. Luckily, there are plugins that allow you to efficiently perform bulk tasks.


Let’s see how to delete users with specific roles using a plugin.


First thing you need to do is install and activate the Bulk Delete plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit Bulk WP » Bulk Delete Users page.


Bulk delete users



Here you can select Bulk Delete options for deleting users. First, you can select the specific user roles. After that you can select the filtering options.


You can restrict bulk delete to users…


  • Who have registered in a given number of days.
  • Users who haven’t logged in the last __ of days.
  • Only if user doesn’t have any post.
  • Only delete first __ users.

You can also select users by meta data.


Scroll down a little to the ‘By User Meta’ box. In this box, you can select meta fields and use conditional operators to compare their values.


Bulk delete users by user meta data



Click on the Bulk Delete button and the users matching the specific criteria will be deleted.


That’s all we hope this article helped you learn how to bulk delete WordPress users with specific roles. You may also want to see our list of 13 free user management plugins for WordPress.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
 

Meenakshi Sandle

Active member
Banned User
Apr 9, 2020
162
38
28
31
Chandigarh
www.trendingmantra.com
Method 1: Manually Deleting WordPress Users with Specific Roles

This method is simpler and does not require you to install any plugin.


Simply go to the Users page on in your WordPress admin area. You will notice the list of users registered on your WordPress site.


Users page in WordPress



On top of the list, you will see the links to different user roles. When you click on a user role, it will show you the list of users with that specific user role.


This page only displays 20 users at a time. If you have more user accounts that you want to delete, then click on the Screen Options tab on the top right corner of the screen.


This will bring a fly-down menu where you can set the ‘Number of items per page’.


Show more items on the users page



For example, we want to delete users with subscriber user role, and there are 144 users with that role. We will enter 144 in the number of items per page field.


Click on the ‘Apply’ button, and the page will reload showing all user accounts with the subscriber user role.


Now you need to click on the select all checkbox next to the Username column to select all items displayed on the page.


Bulk select users you want to delete



If you don’t want to delete some users, then you can uncheck them now.


Once you are ready, click on the ‘Bulk Actions’ menu and then select ‘Delete’. After that click on the Apply button and WordPress will delete all selected user accounts.


If the user accounts you are trying to delete have created posts, then you will be asked what you want to do with those posts.


Delete or attribute content



You can select to delete all content created by those users or attribute it to an existing user account.


Click on the confirm deletion button to continue.


WordPress will now delete all selected users accounts from your site.


This method will work for a few hundred users, but if you have thousands of users, then you don’t want to adjust the screen options because it can potentially overload your server.


Instead you need to use Method #2.

Method 2: Bulk Delete WordPress Users with Specific Roles Using Plugin

The default way to bulk delete users with specific roles is quite simple. However, sometimes you may need to select users based on other criteria as well.


For example, you may want to delete users that haven’t logged in for a while, or users who signed up during a specific period of time.


In such a situation, the default user management tools will not be enough. Luckily, there are plugins that allow you to efficiently perform bulk tasks.


Let’s see how to delete users with specific roles using a plugin.


First thing you need to do is install and activate the Bulk Delete plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit Bulk WP » Bulk Delete Users page.


Bulk delete users



Here you can select Bulk Delete options for deleting users. First, you can select the specific user roles. After that you can select the filtering options.


You can restrict bulk delete to users…


  • Who have registered in a given number of days.
  • Users who haven’t logged in the last __ of days.
  • Only if user doesn’t have any post.
  • Only delete first __ users.

You can also select users by meta data.


Scroll down a little to the ‘By User Meta’ box. In this box, you can select meta fields and use conditional operators to compare their values.


Bulk delete users by user meta data



Click on the Bulk Delete button and the users matching the specific criteria will be deleted.


That’s all we hope this article helped you learn how to bulk delete WordPress users with specific roles. You may also want to see our list of 13 free user management plugins for WordPress.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Thnx so much for such info dear but the thing is.. I need this to be done from backend... not from front end.. hmm. Thank you.
 
  • Like
Reactions: NullMaster

ckeeper

Well-known member
Nov 8, 2019
623
376
63
Thnxfor your help. But where to place this code ?? I tried adding in function.php.. But its keep on saving and saving.. and keep on saving.. nothing.. Pl let me know more..
If for some reason you can not edit the functions.php, you may want to do the modifications in terminal. If nothing works there is also a plugin just for what you need.
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu