Repair Your Pear, Magento

Tags:

June 23, 2010 | Bounteous x Accolite

Let’s face it. At some point in time you will be asked to either move a Magento installation or there will be some catastrophe that requires it.

This is normally a simple task and requires little effort. But what if your move involves a different path to the installation? For example, what if your installation went from /home/name/public_html/magento/ to /home/newname/public_html/magento/? Magento should have no problem surviving this move, but your PEAR configuration is another story.

If you use the Magento Connect Manager to either update your core and extensions or just to install a new one from the community you will quickly find that PEAR no longer functions properly. PEAR looks for your old path to install it’s necessary files for an extension or core files. I have been through multiple sites, blogs, forums and found multiple ways to fix this problem. Some of them worked with little effort, others were unbearable.

There is a quick solution to this, provided that you have shell access, SSH. Let’s save you from more talk and get down to business.

 

How to repair your PEAR configuration after a Magento installation move

1) SSH into your server and move yourself to the Magento installation folder.

2) Simple type in the code below and hit enter!

./pear mage-setup .

3) Done!