How to migrate a Magento Installation to localhost - magento

I've been following several guides over the internet, but I still can't access my Magento (1.6) website from localhost ..
I dumped the DB and imported it to phpMyAdmin, copied the files from the server to my localhost (WAMP), updated local.xml and have been to the core_config_data table and changed web/unsecure/base_url to new URL & web/secure/base_url to new URL.
Is there anything else to do ?
I've seen that sometimes, in some guides, they're asking to go to C:\windows\system32\drivers\etc\hosts and insert the following lines: 127.0.0.1 www.mydomain.com mydomain.com
But I already did this to www.localhost.com since I already have several websites I need to run from localhost, I don't want to change that ..
So when I launch the website from www.localhost.com/mywebsite I'm redirected to the old address and my browser says "Oops! Google Chrome could not find 'the old address' "
Any suggestion would be welcome :)

As long as core_config_data.path values are updated correctly (double-check), the only other thing (besides Magento's PHP code) that could do a redirect is an .htaccess file with a RewriteCond and RewriteRule directive. This also could be present in the VirtualHost.
As another option, you could edit the Windows Hosts file, and resolve your old domain name to 127.0.0.1 and update your VirtualHost's ServerAlias line to include that domain name.

Maybe check that web/cookie/cookie_path and web/cookie/cookie_domain are correctly set into the core_config_data table. I usually delete values of these 2 fields when switching from a server to another.
Also always think of disabling cache before dumping your DB as this can avoid some struggling too.

Related

How to correct the url in magento of website and admin panel?

I am doing a project in Magento. I have uploaded my work onto a live server. I have updated the core_config_data table with the server urls in the secure and unsecure urls. But when I typing the live server link, its going to the local server url and also when I am accessing the live servers admin panel its going to the local server url. Can anyone tell why it is like that ?
After changing website from local to live you need to do following changes:
change url's from core_config_data table
change database details from local.xml
and most important, Redirect problem was due to Magento cache.
Simply delete everything from the /var folder.
After performing the above changes, clear your browser's cache & cookies and check again.
On your computer, check your hosts file and see if you have an entry for your domain.
On windows: C:/Windows/System32/drivers/etc/hosts
On mac or ubuntu: /etc/hosts
If you see an entry that shows:
127.0.0.1 www.mydomain.com or
localhost www.mydomain.com
then you should remove your entry.
You should also flush the dns cache.
Whenever I work locally, I use the subdomain 'local' like local.mydomain.com and this way I dont have to worry about these issues.
Also, you should fully delete the var folder, it is safe to do so.

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.

Magento front end links not working

I am trying to create a test environment for a Magento site. I downloaded all the files and the database and restored to XAMPP. I changed the two base urls in the core_config_data table to http://magento.local/magento/ and modified the Magento config file to connect to the local database. I also added magento.local in the hosts file. I'm using magento.local as I read Magento must have a . in the domain name. The site almost works except on the front end when on http://magento.local/magento/ and try and go to a different page it tries to access http://magento.local/pagename/ and gives a 404 error, i can access through http://magento.local/magento/index.php/pagename. I have also disabled Web Server Rewrites in the backend as I read that is supposed to fix this problem. Any suggestions much appreciated.
Thanks
Alex

Move Magento to WAMP

I am trying to clone a Magento site to wamp and after accessing the local site from Wamp server (localhost) it redirects me to the online version of the site.
I modified web/unsecure/base_url and web/secure/base_url from core_config_data table to "localhost/my_local_site", where the local version of the site is saved.
After I add 127.0.0.1 www.my_site.com to hosts file and turn offline, the local site is loading the first page (index) but the other pages are not loading.
Do you have any ideas what I should do to make the local version of the site work?
Check the database name and user in etc/local.xml
Change the links in your db at core_config_data to localhost or
whatever name your localhost has.
Delete cache and sessions from the localhost folders.
Hopes it helps

Moved Joomla with Akeeba and Kickstart - Pages are returning 404's

I took an akeeba backup and moved it to a new server - the site as it exists has an 'enter page' that's plain html and then joomla is installed to a folder called 'site' so its mydomain.com/site is the Joomla root. The new server does not have a domain pointed to it its just an ip with a username like so the public html is http://xxx.xxx.xx.xx/~user/
so I put my 700mb backup into the http://xxx.xxx.xx.xx/~user/site folder (without ssh you can imagine how long this took) put the kickstart files in there set up the db on the new server ran the kickstart.php with both with the default settings (a blank site url) and trying to set the site url (http://xxx.xxx.xx.xx/~user/site) both ways the akeeba/kickstart backup went off without a hitch - I go to the site's default and it looks fine I'm actually amazed how smoothly it went but if I click the about page or any other page I get a 404.
If I run the same backup on localhost the menus don't load at all so I don't know what thats all about. I have very limited Joomla experience am mostly a wordpress guy - any ideas why the install and site is running fine but I'm getting these 404's?
Most likely the problem is with the SEF URLs. You need to change your htaccess file. Look for:
RewriteBase /site
Change it to:
RewriteBase /~user/site

Resources