We have moved out magento site to another host. But it is redirecting to the old site
We did following changes before moving the site
1. DB backup
2. files are zipped and copied to another host.
after moving the site to another host
1. changed the /web/secure and /web/unsecure values in the DB.
2. In magento files /app/etc/local.xml changed the database name.
3. cleared the var/cache
4. cleared the var/tmp
5. cleared the var/session.
but still the magento site is redirected to old site.
Can any one help me with this.
Thanks
NOTE: It's common practice to empty the var/cache, var/session directories before copying to new location. Clearing cache is mentioned below as it's necessary to clear the cached config after you've run through the list and properly set database access, BaseURL, etc.
Copy application files to new location and import database into MySQL. (best to do this with a tarball and database dump sql file, ftp has issues with things like getting .htaccess files to transfer, case to matter, etc.) Note: more sophisticated Magento admins use rsync, it's far easier.
(important!!) Make sure file/folder permissions and owner/group are correct so that var/
folder system is writable. Otherwise the Magento cache gets written in system /tmp
instead of Magento var/
and only a server reboot or manual deletion will clear Magento cache out of /tmp
. Also, not having var/ writable means that any drastic errors that write a file to var/report/
will fail to write any stack traces, compounding your installation heartburn.
Make sure app/etc/local.xml
points to the proper database and make sure if you back up the original local.xml
that it doesn't end in .xml
-> needs to be something like local.xml.sv1
Change your database entries Unsecure BaseUrl for and Secure BaseURL to point to your new location (http://www.example.com
and if ssl cert installed https://www.example.com
respectively). Use phpmyadmin to look for the paths web/unsecure/base_url
and web/secure/base_url
in the core_config_data
table. (Note: entries will exist for each scope set, minimum is Global)
Manually clear your cache by deleting all the mage--?
subfolders in var/cache
If you were using the compiler on the previous site, disable compiler with SSH command line php shell/compiler.php disable
from the Magento root.
Attempt to load your admin backend, you should be on the new server URL now.
Following these steps should clear all the hiccups that cause Magento to adamantly redirect back to the old server. And believe me, I've had them all happen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With