Magento

Magento 1 Command Line Tool

Magento 2 comes with command line tool to manage magento installation. This help you to do many tasks like clearning cache, install extension easier.

Magento 1 CLI is available from

https://github.com/netz98/n98-magerun

To install Magento 1 command line tool, go to Magento install folder and run

Now you will be able to use the command line with

Here is an example how to Upgrade an Extension using CLI

Magento 1.9 SSL

Enable SSL in Magento 1.9

To enable SSL in Magento, go to System > Configuration

Magento 1.9 SSL

Click on “Web” link on left menu.

Magento Configuration

On this page, set Auto-redirect to Base URL to No.

Magento Auto-redirect to Base URL

Under “Unsecure” option, change the URL to use HTTPS.

Magento HTTPS

Under “Secure” option, set “https” for Base URL. Set “Yes” for both “Use Secure URLs in Frontend” and “Use Secure URLs in Admin”.

Magento enable SSL

If your Home page is linking to non HTTPS link, this is because Default page is set to CMS page, you need to edit and replace content of CMS page to use HTTPS links under Magento Admin > CMS > Pages.

magento-admin-path

Change Magento 1.9 admin URL

To change Magento admin URL, login to Magento Admin area.

Go to System > Configuration

On next page, from side menu, click on Admin menu.

On next page

Replace “okadmin” with whatever folder name you need for your magento admin area.

Click “Save Config”

Edit file

Find

Replace admin with your new folder name for admin area.

Now you need to Clean magento cache. This can be done with command

Now you admin area will work on new URL.

Doing it with MySQL

Here is the changes made on database when i changed a sites admin folder path to “localsense”.

Some useful SQL

You can just set the value for “admin/url/use_custom_path” to 1 and “admin/url/custom_path” to the new admin folder name you need.

Clean Magento session folder

On a VPS hosting Magento 1.9 disk was getting full. On checking, found var/session folder taking too much disk space.

Disk usage was 34 GB.

This folder is used to store PHP session files. You can delete them.

I created a cronjob to delete the session files that are older.

Add following content

Set a cronjob to run everyday

Method 2 – Strong session in database

Edit file

Find

Replace with

Magento