Backup WordPress project files / DB using a bash script

Backup WordPress Code + Database

WordPress is undoubtedly the most popular blogging platform on the Internet. And when it comes to the maintenance or regular backups, life is not easier unless you have some backup script which works great via SSH & cron daemons. Here is the custom backup script used for taking the backup of WordPress project files & …

Read more

Backup Magento project files / DB using the bash script

Magento 2 Backup with Bash/Shell Script

I have googled for the bash script to backup Magento sites/DB but none of them worked for me the way I wanted. So I decided to create a custom bash script which is simple and does the job perfectly. I have developed the script for my own need. But I thought it would be helpful …

Read more

Configuring city as a dropdown option in checkout billing & shipping address

Introduction Magento provides country and region* as a dropdown option in checkout addresses, unlike city which is an input text field. This on one side provides flexibility but on the other side increases chances of a typo in city names. If you want your store to have an extra operation like giving free shipping to …

Read more

Using get_defined_vars() for debugging local scope variables

Suppose say, you want to debug variables in some observer method. You can either log each variable or simply dump it. But when you have many variables, debugging each variable can be an overhead task. For this purpose we can use PHP’s inbuilt function: get_defined_vars() How to use it? //put this line at the top …

Read more