Backup WordPress project files / DB using a bash script

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 moreBackup WordPress project files / DB using a bash script

Backup Magento project files / DB using the bash 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 moreBackup Magento project files / DB using the bash script

500 Internal Server Error: Mismatch between target GID (XXX) and GID (XXX) of file

Today (at the time of writing) I tried to install Magento 1.7.0.0 via SSH as ‘root’ user using following bash script: #!/bin/bash wget http://www.magentocommerce.com/downloads/assets/1.7.0.0/magento-1.7.0.0.tar.gz wget http://www.magentocommerce.com/downloads/assets/1.2.0/magento-sample-data-1.2.0.tar.gz tar -zxvf magento-1.7.0.0.tar.gz tar -zxvf magento-sample-data-1.2.0.tar.gz mv magento-sample-data-1.2.0/media/* magento/media/ mv magento-sample-data-1.2.0/magento_sample_data_for_1.2.0.sql magento/data.sql mv magento/* magento/.htaccess . chmod -R o+w media mysql -u dbUserName -pdbPass dbName < data.sql chmod o+w …

Read more500 Internal Server Error: Mismatch between target GID (XXX) and GID (XXX) of file

Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration

I got the following error for one of the Magento e-commerce website: Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration After googling it was found that the related headers module was not enabled in Apache. I was able to fix the issue simply by following two commands: …

Read moreInvalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration

Unzipping archive files in Linux

Extracting archive file depends on the type. Here goes the list of extracting/unzipping command for various archive types: 1> Unzipping .zip file unzip filename.zip 2> Unzipping .tar file tar -xvf filename.tar 3> Unzipping .tar.gz or .tgz file tar -zxvf filename.tar.gz tar -zxvf filename.tgz 4> Unzipping .gz file gunzip file.gz 5> Unzipping .bz2 file bunzip2 file.bz2 …

Read moreUnzipping archive files in Linux