How to deploy create-react-app in Docker with docker-compose with NGINX

Posted by Prem Tiwari | Updated on | in Docker Tutorial.


In this post, You will learn how to deploy create-react-app in Docker with docker-compose with NGINX as reverse-proxy. To dockerise the create-react-app please follow the steps below: 1. Create a Project folder 2. Install create-react-app …

How to connect git repo to Godaddy hosting server

Posted by Prem Tiwari | Updated on | in General.


In this post, you will learn how to connect git repo to Godaddy hosting server. This is for a Linux shared hosting account with GoDaddy. Install Git on your GoDaddy shared hosting server Server does …

Google search console AMP validation error with latest update

Posted by Prem Tiwari | Updated on | in WordPress Core.


Google search console AMP validation error with latest update. I you got Disallowed attribute or attribute value present in HTML tag AMP errors in your Google search console after updated with the free Yoast SEO …

Remove generator meta tag for WordPress AMP Plugin

Posted by Prem Tiwari | Updated on | in WordPress.


This is how to remove the generator meta tag for the WordPress AMP Plugin. This refers to the WP AMP plugin by Automattic. Use the below example code in your theme’s functions.php file to remove …

Four reasons why every business needs a website and how to do it yourself without hiring a web agency or freelancer.

Posted by Prem Tiwari | Updated on | in WordPress.


If your business has come this far without a website, you may be wondering: Do I really need a website for my business? What’s the benefit of having a website if my business is already …

PHP array_chunk() example

Posted by Prem Tiwari | Updated on | in PHP Documentation.


PHP array_chunk() — Split an array into chunks. Chunks an array into arrays with size elements. The last chunk may contain less than size elements. Syntax: Returns a multidimensional numerically indexed array, starting with zero, …

PHP array_shift() example

Posted by Prem Tiwari | Updated on | in PHP Documentation.


array_shift — Shift an element off the beginning of array. array_shift() shifts the first value of the array off and returns it, shortening the array by one element and moving everything down. All numerical array …

PHP array_unshift() example

Posted by Prem Tiwari | Updated on | in PHP Documentation.


array_unshift — Prepend one or more elements to the beginning of an array. array_unshift() prepends passed elements to the front of the array. Note that the list of elements is prepended as a whole, so …

Restrict access to post if it is currently being edited

Posted by Prem Tiwari | Updated on | in WordPress.


In this post, you will learn how to restrict access to post if it is currently being edited in your WordPress site. The warning notice gets dispatched by the function wp_check_post_lock. The following redirects the …

How to rewrite URI of custom post type in WordPress?

Posted by Prem Tiwari | Updated on | in WordPress, WordPress Core.


In this post, I will share how to rewrite URI of custom post type in WordPress. This is what I use to rewrite custom post type URLs with the post ID. You need a rewrite …

PHP ltrim() Function

Posted by Prem Tiwari | Updated on | in PHP Documentation.


This function returns a string with whitespace stripped from the beginning of str. Without the second parameter, ltrim() will strip these characters: Syntax: Example #1 Usage example of ltrim()

PHP rtrim() Function

Posted by Prem Tiwari | Updated on | in PHP Documentation.


This function returns a string with whitespace (or other characters) stripped from the end of str. Without the second parameter, rtrim() will strip these characters: Example #1 Usage example of rtrim() Output:

PHP trim() Function

Posted by Prem Tiwari | Updated on | in PHP Documentation.


This function returns a string with whitespace stripped from the beginning and end of str. Without the second parameter, trim() will strip these characters: Another example: Remove newlines (\n) from both sides of the string:

How to retrieve the value of a text field in flutter

Posted by Andre Scott | Updated on | in Flutter.


In this article, you will learn How to retrieve the value of a text field in flutter which a user has entered into a text field: After supplying the TextEditingController to the text field, begin …

How to add item to media library from blob or dataUrl?

Posted by Prem Tiwari | Updated on | in WordPress.


There is no direct way to pass pure binary data to the WP upload object. Only File based objects will be processed. I had to create a separate XmlHttpRequest. (Simply using $.ajax() did not work …