I completed my website and before launch, I needed to transfer my website to another domain. As soon as I transferred the files, and opened the new website, it started showing me

Fatal error : Class Varien_Autoload not found in mage.php on line 54

I don't know where it went wrong, and am really in a helpless state right now. I searched on internet, but everywhere they say to disable compilation. The website already had compilation disabled. I also checked for the include path by putting the below code in mage.php above Varien_Autoload::register();


And I got this path as in result:

string(81) "/home/pavaiyacart/public_html/main/includes/src:.:/usr/lib/php:/usr/local/lib/php" 
  • Did you find and replace your old base URL with the new base URL in you sql dumb of the database?
    – pontikos
    Commented Oct 29, 2016 at 0:11
  • No, I don't have any idea about that. Although I have solved the issue by reconstructing the whole site from scratch again. But I have saved that previous data and I would love to resolve its issue. Will Check what you pointed and will notify you soon. Could be of help to someone else. Commented Oct 29, 2016 at 18:28

2 Answers 2


Let's say I have a Magento site on a development server and I installed and access it through


then I want to move it to productions.

1st. I would zip or download all files (don't miss the .htaccess).

2nd. I would take an SQL dump from phpmyadmin (remember to disable foreign key checks)

3rd. I have to open my backup.sql dump with a text editor. (I use notepad++ for small files or vim from Linux command line for large ones). Now let us say my production domain is myawesomesite.com. I have to find in the editor


and replace it with


don't include in your search and replace any http:// and remember to include www. if this is your preferred domain.

4th. Import the dump to a fresh database

5th copy/unzip the files to production/

6th Go app/etc/local.xml and edit the database connection settings.

Feel free to ask or search for any further questions.

  • Currently I am busy in configuring and giving final touch to this website which caused the above error. It's live now. Once I get over this, I will surely follow these steps and will let you know about the results. Thanks a lot buddy! Commented Oct 29, 2016 at 18:48

This error happens when one enables the magento's compiler. For example, you are moving your site from link1.com to link2.com. The file location on the server of link1.com is public_html/link1/... and file locations for link2.com is public_html/link2/... So when you compiler is enable, your Magento setup will be looking for the absolute path stored in your magento rather rather looking for the path using the BaseUrl. You can check if compiler is enable or disable in the includes/config.php file in root directory. if everything is commented then compiler is disable otherwise it's enabled.

So, in this case you want to disable the compiler using one of the following method.

Choose one of the following Solutions

  1. run command "php -f shell/compiler.php disable" in your Magento install root folder.
  2. manually comment every line in Magento_root_directory/includes/config.php file.

Let me know if you need more help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.