server

Nano

Introduction
There is a long-running battle between Linux users about which command line editor is the best. In one camp vi is the editor that rules the roost but in another, it is all about emacs.

For the rest of us who just need something simple to use to edit files there is nano. Don't get me wrong vi and emacs are very powerful editors but sometimes you just need to open, amend and save a file without remembering the keyboard shortcuts.

Run cron in WHM

No, you cannot set a cron job from WHM. If you have to set a cron server side, you will have to configure it via SSH as user "root". SSH to your server and execute:

crontab -e
This will edit the root's cronjob file at /var/spool/cron/root. Set the cronjob you like and restart the crond service.

service crond restart

htaccess redirects

Useful 301 Redirects for SEO using .htaccess
Written by Creare - Published on May 8, 2014
It is well known that 301 Redirects are vital for recovering link equity from URLs that are no longer existing on our current website but were available on a previous version.

This usually occurs when migrating a website from one domain to another or perhaps even updating a website to use a new system or framework where the previous URL structure cannot be effectively replicated.

Log in with an SSH private key on Linux and Mac

This example demonstrates how to use a private key to log in to a Linux server by using a private key by using a Terminal session on OS X. However, you can follow the same process to use a private key when using any terminal software on Linux.

Note: For information about using SSH private keys on Windows operating systems, see Logging in with an SSH Private Key on Windows.

Prerequisites
To complete this process, you need the following software applications:

Download Composer to Mac OSX

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Increase CLI php memory limit on OSX

published by Albert Skibinski on Sat, 2015-02-21 13:52
When running MAMP or MAMP Pro on a Mac OSX (this is on version 10 Yosemite) you will notice that PHP executed from the command line (CLI) will use different PHP settings than your website. In this case, OSX is using its own built-in apache server and php settings, not the ones defined by your MAMP setup.

You can easily change this though, as long as you know which php.ini to change.

First, check your memory limit, by running the following command on your SSH shell or local terminal: