Moved magento site to another host, redirecting to the old site - magento

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

Several steps involved in cloning or moving a website.
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.

Related

Jomsocial transfer from one server to another

I am trying to transfer my website with jomsocial from one server to another.
www.iremember.gr
Previous server steps:
Backup all the files from public_html folder.
Backup the DB from php my admin.
New server steps:
Install joomla, entered the prefix in DB of the previous DB prefix.
Deleted all files from public html and extract the backup from the previous server.
Export the DB from the previous server, to the new one.
Changed the configuration.php file with the new user/dbname/password.
Now when i try to enter the new server at this IP address
93.174.121.23/~niremco/
and i login ok.
It loads the main page
but when i try to enter a profile i get a 404 Error.
Although when i try to see the profile
http://93.174.121.23/~niremco/index.php?option=com_community&view=profile&userid=109
i can see it.
But not from the correct link that i had in the previous server
http://93.174.121.23/~niremco/team-iremember/profile
Any idea why this happens?
You probably haven't copied the .htaccess file from the old website, you will need to copy it from the old Joomla website to the new one. This typically happens because the .htaccess file is considered to be a hidden file and as such does not get copied over automatically.
First of all, installing a clean Joomla first is totally unnecessary. As for why you are getting the 404 error pages, this is because you probably have URL rewrite enabled in global configuration, while there is not a proper .htaccess file sitting in your new server.
With proper I mean either no .htaccess at all, or one that was setup for your old hosting. I rather tend to think the second.
To test that your moved correctly your site, disable url rewrite from global configuration.
If you would want to test with url rewrites enabled, then I would suggest to edit the hosts file in your computer and point your domain to the ip address of the new server.
Google Search: How to edit my hosts file - choose the resource for your OS.

Locking Out Admin After Migration - Magento

So I've gotten myself into a bit of a pickle and need assistance from StackOverflow Gods.
We're trying to transfer a Magento site from one server (Godaddy) to another (Private Virtual Server) for the purpose of becoming a test site.
I'm not familiar with Magento (my first mistake) but I researched migration, and I ran across an article that said all you need to transfer is the database, theme files, catalog files and skin files.
So that's just what we did. We setup a fresh install, added the files and the site (http://boulderfootandankle.com/apv-test/) looks like it's got some formatting errors. We figured we could fix those after adding the database.
As soon as we connected the database through the local.xml file, the theme changed to a generic one (I imagine a fallback) and we were locked out of the admin.
I tried a number of the solutions offered for this very problem, which included:
Clearing the var/cache and var/session folders.
Altering the core config data values for the unsecure and secure web base urls.
Deleting the unsecure and secure web base urls and cookie values form the database.
Changing the sessions save CDATA from "files" to "db"
Changing the install date to the original
Altering the varien file
...and nothing seems to work.
At this point, I'm just wondering if doing a fresh transfer of the site from one server to another, instead of transferring specific files into a fresh install, would work
Did you use the same encryption key as the previous installation? The encryption key is set in the local.xml file and needs to be the same on both extensions. When you did a fresh install it would have given you a new encryption key and this could be why you are unable to login.
just my quick list for transferring sites...
1. run files backup and mysql dump (from source)
2. Copy local.xml (from Target)
3. Restore backup and mysql dump (to Target)
4. Restore local.xml(from step 2 to Target)
5. Correct base_url (in Target)
The only time I have ever had a problem with this is when I run things locally for dev in that case there is varien specific check that monks with admin login(but, sounds like you know this).
https://magento.stackexchange.com/questions/26071/magento-1-9-can-t-login-to-admin-panel
I am on 1.14 and the posters suggestion essentially is the same fix I found. Of course the responder is totally correct on the horror of this solution but, since this is a test site as long as you leave yourself the right notes you should be able to undo this when you move to production.

changes of db details in local.xml not affecting

I recently moved my magento store to Amazon cloud server and database to RDS database server.
I made the necessary changes in local.xml and cleared the var/cache and var/session folder.
But I don't know how the magento is still picking the old database details which I was using on old server.
I think its not picking the details from local.xml but from some other cache stored somewhere else other than var/cache.
I have even tried by renaming and deleting the local.xml file but still result is the same.
Where else could be the configuration cached data be stored ?
Please help.
Make sure there are no local.xml.extra or local.xmlanything files in app/etc directory. (This happened with me sometimes. I had a habit of renaming old local.xml file to local.xml2 and Magento picks that local.xml2 file as a configuration file. So you should delete the old file or move it to some different location.)
Make sure the Magento Caching/ Any other caching is disabled. There can be Full Page Cache Extensions installed in your Magento Setup.
Refer this link Magento cache not getting cleared

Megento dev site re-directing to live site URL

I'm having a huge issue with accessing my dev site. I two magentos sites on different servers. One is the dev site, the other live. However I needed to copy the database from the live to the dev site.
Ever since i did this i've had problems with accessing the dev URL. As it keeps re-directing me to the live site. I've googled the issue and tried the following:
Accessed the 'core_config_date' and changed the unsecure/BASE_URL & secure/base_url and changed them back to the dev URL.
I then went to clear the cache on the dev site, which had already been cleared from when i was installing a plugin.
Set everything to 0 in 'core_cache_option'.
Cleared cache on my browser
But i'm still getting the issue of the site re-directing to the live URL.
I've noticed a few people had had the same problem, but the above solution doesn't seem to be working for me. Any help would be much appreciated.
Thanks
Right so managed to sort it. It was a permissions issue. I overlooked it as I didn't have a linux user setup for this site. However the folder user was set to 'root' as opposed to 'www-data'.
For anyone with this issue in the future, I strongly recommend checking permissions on the server/folder for caching.
Steps to fix the issue:
Change base URL in the 'core_config_data' table (can be found on line 5 or 6, give or take)
Check permissions on your siteroot/var folder. Delete everything from /var/session & /var/cache
Run 'chown websiteuser -R siteroot' and then 'chmod u+w -R siteroot' for permissions changes.
That should be enough to get it working.
Do the below steps in your development server :
1) Check the development server database hostname,username, password in your config.xml file in below path : app/etc/.
2) Open your live server database in any editor and find the live site url entirely.
and replace with your development server url with searched result.
above two steps will solve your issues.
here after it will now solve.
3) Check your .htaccess file in your root folder to check the any redirection rule.
Check your file permissions and set them properly so Magento doesn't end up creating a MagicCache in the system /tmp folder which is where your core configs are being cached, allowing for you to clear var/cache till the end of time and have the settings in the database never take.
All over here Can't change Magento base URL -> Stuck in cache

Error when duplicating Joomla setup

I have a Joomla installation set up on my local server. I have duplicated with a new name the top-level Joomla folder so that all the information I have already put into the database can be edited slightly, whilst still keeping the original intact.
I have copied the database files over to a new database and made the relevant changes in Joomla admin. I've opened up configuration.php and changed all the file paths to the new one.
However, now I'm getting a server error when trying to access the web page and admin area. Are there any other files I need to edit with the new path to enable it to work under the new parent folder?
You shouldn't have to edit any files with any paths to make it work other than the tmp and log folders and the root folder line in htaccess if you have SEF URLs turned on. Turn off SEF URLs and see if the site starts working, if it does, then you need to edit htaccess. Since your admin is not working, my guess is that you messed up your configuration.php. Copy over the original unedited version to the copy site, it should work. You can then adjust the tmp and log paths within the admin in the global configuration.

Resources