AMP Error – boilerplate

This post solves the issue of amp boilerplate tags are malformed: The mandatory text inside tag ‘head > style[amp-boilerplate]’ is missing or incorrect. Cause was: YUI compressor (PHP) for CSS in w3 total cache (instead of default minify compressor). Solution: Change the compressor back to Minify (default), save settings and purge cache. Explanation: The boilerplate […]

Display SKU on product page – OpenCart 3.0.2

This post explains how you can display SKU (Stock Keeping Unit) of a product on the frontend of product page in OpenCart 3.0.2. We will be doing this through an ocmod modification that I coded. OCMOD to show OpenCart SKU on product page You can download the OCMOD from: Github: Download the install.xml file […]

Sequence of do_action & add_action using WP hooks

I was trying to hook add_action into one of the plugins do_action, however was not able to get it done until I realized that they have a sequence to be followed! In this post I will give some examples to understand this unexpected behavior and how to make it expected. Wrong way of adding add_action […]

Error: Compilation failed: invalid range in character class at offset [Solved]

If you recently updated your server to PHP 7.3, you might have seen this error message: Compilation failed: invalid range in character class at offset . . . This error is due to update in PHP 7.3 and how it handles regular expressions. Error: Compilation failed: invalid range in character class at offset I encountered […]

WordPress redirect hack [Solved]

This week, a massive hack attempt on numerous wordpress based websites happened. The hack causes your wordpress website to redirect to or any other similar website. This was an interesting find and was due to a zero day exploit in a wordpress plugin. I successfully fixed one of my clients website infected with this […]

How to implement reCaptcha v3

This post explains how to implement the Google reCaptcha v3 easily in your site code. You can use this method or code in any PHP site, including WordPress, Joomla!, Drupal, etc. The code consists of three parts: Generate site-key and secret-key from google recaptcha for your site First part of code goes into your form […]

Connect GCC via Mac Terminal

Google cloud console provides a browser based SSH client that we can use to easily connect to our google cloud console instance. However there are reasons why you might want to connect using your operating systems ssh client. One being faster connection and response obviously. Secondly it’s easier to manage your virtual server from your […]

Remove sidebar from Schema lite single page

This tutorial explains how you can remove the sidebar from the single page template of Schema lite WordPress theme to make by making a full page template for single page without sidebar. How to remove sidebar from schema lite wordpress theme Follow these steps: Make a copy of page.php Goto the theme folder and make […]

How to update WordPress to 5.0 (manual & automatic)

Today WordPress version 5.0 has been released as a major release update. WordPress 5.0 has a code name “Bebo”. In this tutorial, you will learn how to update your wordpress installation from any previous version to the 5.0. First of all we will see how to do this automatically, and then we will also discuss […]