Categories
Code

Upgrade Magento via SSH

Disclaimer: I’ve upgraded Magento CE 1 using this process with no issues many times. I can not confirm this process will work with Magento CE 2. As always, BACKUP EVERYTHING FIRST.

  1. Disable Cache
    Navigate to System > Cache Management and disable all.
  2. Turn on Maintenance Mode
    touch maintenance.flag
  3. Clear /var (need to replace htaccess file if you’re blocking access)
    rm -rf var
    mkdir var
  4. Backup Files & Database
  5. Start the Upgrade
    chmod -R 777 ./*
    chmod 550 ./mage
    ./mage mage-setup .
    ./mage config-set preferred_state stable
    ./mage list-installed
    ./mage list-upgrades
    ./mage upgrade-all
  6. Clean Up
    php shell/indexer.php reindexall
    See: https://magento.stackexchange.com/questions/68627/file-permissions-changed-after-applying-patch-403-forbidden-error
    rm -rf maintenance.flag
  7. Verify and Upgrade Database by Opening the Site

Don’t forget to re-anable cache management.

Categories
Code

Delete Error Logs

SSH commands to list and delete error logs.

  1. List error_log files.
    find . -name error_log
  2. Delete all error_log files.
    find . -name error_log -delete
Categories
Brevity

Amazon, Apple, Facebook & Google – Who Wins/Loses?

Categories
SEO

I Rank Better Than You Do, Na-na Na-na Boo Boo

I’m a pretty humble person. I don’t like to taunt, but I’m from the show me state and this is the best way to show SEO best practices in action. I rank better than you do is my primary keyword, and if all goes well, this page will rank number one for the low competition phrase quickly.

Organic search optimization is not rocket science. I firmly believe that SEO comes down to executional excellence of the fundamentals, and staying curious about new trends and tactics.

Here is How I Rank Better Than You Do

The primary keyword (I rank better than you do) appears:

  1. Once in the page title.
  2. Once in the meta description.
  3. In the page’s HTML headers.
  4. In the body copy. A good keyword density to aim for is one instance for every 100 words with a minimum of 300 words per page.
  5. In link/anchor text from other pages.
  6. As the filename of the image and in the image alt attribute.
  7. In the url of the page.

While there are a number of factors that go into ranking, the seven above are the most important. This also assumes there are no issues indexing pages. As secretive as Google is regarding their search ranking algorithm, they provide pretty detailed information for webmasters. Check out their Webmaster Guidelines and Webmaster Tools. Search engine optimization is more about attention to detail than anything else. That said, do not let SEO get in the way of a great user experience. Focus on UX above all.

This ‘I rank better than you do’ test is just for fun. If you are serious about Search Engine Optimization, check out some of the top SEO blogs including: Search Engine Land and Moz.

I’m an old veteran in this space and I’m always happy to discuss SEO. Feel free to contact me if you have any questions.

Categories
Brevity

I hate writing, so I’m re-launching my blog

I hate writing because like most people, I think I suck at it. I’m hoping that’s a sign of a decent writer. I’m also a mild introvert, so the thought of writing about myself makes me cringe. Why the heck am I resurrecting my blog?

3 Reasons:

  1. The only way I’m going to get better is to practice.
  2. Writing can be therapeutic.
  3. Every once in a while I come up with an interesting thought or two, and I’d like to have those thoughts shared and archived.