Showing posts with label magento. Show all posts
Showing posts with label magento. Show all posts

Tuesday, 1 October 2013

How to change Magento domain name

When you need to move Magento store to another domain name, there is one issue which, according to forums, costed developers hours of frustration. And the issue is domain name which is stored in Magento configuration tables.
So, if you moved Magento to another domain name and all you get when you open your new domain in the browser is redirect to the old domain, you are not alone :) I just wasted lots of time sorting this out! Here is solution which worked for me.
First step was simple – finding in the database base url value: table name is core_config_data and the keys are /web/unsecure/base_url and web/secure/base_url. Change those two to the proper values.
Second step is also very logical – cleanup cache! Magento does cache everything, including values of config table, so go to the Magento root with FTP or SSH, remove everything from the folders var/cache/ and var/session/.
At this point changing URL seems to be working for most installations, so if you are lucky, that’s all you have to do. For me it was just a start :) Magento was redirecting to my old domain name. Browser cache cleanup – doesn’t help. APC cache cleanup – doesn’t work. Still redirecting…
Solution was simple (well, as usual with problems like this). Permissions were messed up on the var folder of Magento, so it was not able to write cache there (result of files transfer). That issue doesn’t stop Magento from caching (which is kinda good), but trick is that you need to find where the cache is hidden. So, check your tmp folder. It could be system /tmp/, or, in my case, /var/www/tmp/ (that was FreeBSD). In the temp folder I discovered magento subdirectory with all the cached files. After removing files, I see my site up!
Let me know if that helped you or if there are some other issues to watch for!

How to solve Magento error – Exception printing is disabled

Source: http://www.ipserverone.info/applications/magento/how-to-solve-magento-error-exception-printing-is-disabled/
Whenever you see this error:

There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXXXXXXXX
You can do as followed:

1. Locate the root directory where your Magento is installed. Search for “errors” directory.
2. Change the filename of local.xml.sample to local.xml
3. Reload the page where it shows error message, you will see a full list of error message – The purpose of rename local.xml is to allow the full error message to be shown.
4. Now, locate magento_directory/lib/Zend/Cache/Backend/File.php and look for:

protected $_options = array(
'cache_dir' => 'null',
Replace it with:

protected $_options = array(
'cache_dir' => 'tmp/',
And save the file.
5. Now, go to Magento root directory and create a new directory with the name “tmp”.
6. Refresh the error page and see if the issue solved.