Configuration guides for IT Administrators

⏱︎
Read time:
Without using any external WordPress plugin, you can still disable Gutenberg with these codes in functions.php

⏱︎
Read time:
Secure your websites using Sucuri Firewall. Here is the best deployment method of Sucuri Firewall to protect your websites.

⏱︎
Read time:
Here is how to add a checkbox option to every new post of whether or not to email the post to Jetpack subscribers. Use the following code.

⏱︎
Read time:
COM and DOTNET are not available by default in PHP Core, php.ini. You have to manually add COM support to PHP if you face issue. Typically, you get an error message as Step 1.Copy php_com_dotnet.dll located in xampp\php\ext folder to c:/windows/system32/ Step 2.Add following to php.ini file located in xampp\php folder [COM_DOT_NET]extension=php_com_dotnet.dllextension = c:/windows/system32/php_com_dotnet.dll Step 3.Restart…

⏱︎
Read time:
Import CSV into MySQL This is a simple version of LOAD DATA command to import simple CSV file into MySQL table. It look only .02 seconds to import 40+ records. LOAD DATA INFILE ‘c:\datafolder\t_order_details.csv” INTO TABLE t_order_details FIELDS TERMINATED BY ‘;’ LINES TERMINATED BY ‘\n’ IGNORE 1 ROWS; Assuming you have the first row as…

⏱︎
Read time:
This SQL query provides you with list of all tables with largest size in a MySQL database that is executed. SELECT table_schema AS `Database`,table_name AS `Table`,ROUND(( ( data_length + index_length )/1024/1024),2 ) `Size in MB` FROM information_schema.TABLES ORDER BY ( data_length + index_length )DESC; LIMIT 0, 30

⏱︎
Read time:
WP_DEBUG is an useful debugging tool available in WordPress to see PHP errors on your website and they are helpful for developers to troubleshoot issues with the website. To turn on WP_DEBUG, add following code in wp-config.php define(‘WP_DEBUG’,true); It is not advisable from security point of view to turn on WP_DEBUG on production websites as…

⏱︎
Read time:
Empty() Returns False if empty() has non-empty and non-zero value. Returns True for Null, 0, “” Isset() Returns False for Null Returns True for 0, “” or any value Both Textareas and Texboxes will sent “” values and not Null to the $_POST[], so use Emtpty() instead of Isset() On the other hand,…

⏱︎
Read time:
This solution worked for me. Step 1: Specify the printable contents inside this div. <a href=’javascript:printContent(“ad_div”)’ id=’print_link’>Print</a> <div id=’ad_div’> specify your printable content here… </div> Step 2: JavaScript function to print contents inside div in your webpage. function printContent(div_id) { var DocumentContainer = document.getElementById(div_id); var html = ‘<html><head>’+ ‘<link href=”css/template.css” rel=”stylesheet” type=”text/css” />’+…

I’m Lucas Brey, a travel blogger sharing practical guides, hidden gems, and honest tips from the road. Follow along for smart itineraries, great food finds, and stories worth bookmarking.