How to install Google APIs Client Library for PHP using Composer

These are the steps I followed to install the Google APIs Client Library for PHP using Composer.

Installing PHP dependencies in production using Composer

How I install the PHP dependencies on the production server using Composer.

Calculating the number of days between two dates in PHP

Learn how to calculate the number of days between two dates in PHP.

How to change date format in PHP

Learn how to convert a date to a different format (e.g. “dd/mm/yyyy” to “yyyy-mm-dd”) in PHP.

[Solution] Composer: openssl and curl extensions errors

How to resolve openssl and curl errors when installing a package in Composer.

Allow a PHP script to run only through CLI

How to restrict the execution of a PHP script to CLI (Command Line Interface) only (so it doesn’t run through the browser).

How to run a PHP file on a remote server (SSH) via a Bash script

Learn how to execute a PHP file remotely (using SSH) via a Bash script.

How to calculate estimated reading time with PHP

Create a PHP function that retrieves the estimated reading time in minutes for a provided text. Learn how to implement this on a WordPress site.

User snippets in Visual Studio Code: A productivity game changer

Become a more efficient programmer by using the user snippets option in Visual Studio Code that lets you quickly insert your most frequently used code snippets.

 — Updated

Automatic update of CSS / JS file version in PHP and WordPress

Learn how to automatically update a file version when it changes with PHP and WordPress.

How to customize (or disable) the automatic resizing of big images in WordPress

Learn how to modify the threshold for the WordPress auto-scaling feature or disable it completely.

Restricting access to WordPress REST API

Learn how to restrict access to the WordPress REST API to improve the security of your WordPress site.

Preventing direct access to PHP files in a WordPress site

Implement this best practice of preventing direct access to PHP files to improve the security of your WordPress site.

Sanitizing array values in WordPress

Learn how to sanitize an array of email addresses in WordPress.

How to make Gutenberg embed blocks responsive

Learn how to enable the responsive feature of the embed blocks in WordPress block editor (Gutenberg).