Reducing the Size of Your Magento Install

Quoting a Magento Professional Partner nicknamed “Crucial”:

Yes, it’s safe to delete that data. I always clear it out after an upgrade:

rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*

Basically when you are upgrading and installing, your downloader folder will become very large, and you are safe to clean out the two following folders:

  • /downloader/pearlib/cache
  • /downloader/pearlib/download

Install mod_security 2 on CentOS/RedHat

This is a translation from Spanish to English, but still the best guide I’ve used so far. Modified slightly to help others but could use more work.

Important: ModSecurity blocks lots of UNIX commands. I had to add dots to them. They are colored red so you know to change them.

This article assumes that you have installed a RedHat Enterprise or CentOS and not guaranteed to work, although we have tested on several CentOS 4.5 with success. Continue reading…

Edit the Magento Invoice PDF Templates

Code Location

  • /app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php
  • /app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php

Changing the font size

Change the font size in the two files:

  • /app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php (line 487-507)
  • /app/code/core/Mage/Sales/Model/Order/Pdf/Items/Abstract.php (line 255-274)

Change the invoice logo

  • Admin -> Configuration -> Sales -> Invoice and Packing Slip Design

More info

  • Changing the invoice size from A4 to letter
  • Changing the font from Libertine to Helvetica
  • Read up here.

Work on sites before the DNS has rolled over (by editing the hosts file)

Important: This does not work if you are behind a proxy, which includes antivirus firewalls and such.

  • Right click on the hosts file in C:WindowsSystem32driversetc
  • Go to properties, turn off “read-only
  • Open the file using Notepad or any text editor
  • Add a line to the bottom of the file with the IP and domain
  • When you are done, don’t forget to turn read-only back on again


Use the IP of the new server and then the domain you want that IP to resolve to.

Now you can browse to that domain and it will resolve to the new IP even though the DNS hasn’t been updated yet.

Display code in the browser

Use &lt; instead of “<” and &gt; instead of “>”.

Or if you’re pasting code into a WYSIWYG editor, just paste into the design view and not the source view. It should automatically convert the characters for you.

Canada Post module for Magento now available

After this module is installed you can request quotes from the Canada Post Sell Online system.

Feature list

  • Storage of sellonline information
  • Easy setup process
  • Easy configuration / setup process
  • Add ability to view number of boxes to ship and contents of each box
  • Orders from backend may use “Free” shipping method

Get it here.

Make your WordPress site faster (easily)

There’s a feature called “gzip” that’s installed by default on most web servers. Modifying your site to make use of it can really speed up the performance.

How much faster?
Try the quick and easy mod_gzip tester by Just enter the URL and it will tell you how much faster it would be.

How to enable it in WordPress:
It’s easy! Just grab the plugin called Gzippy and install it. Run the gzip tester again to see it in action.