2

I moved my magento installation to a new server. I copied all the files,folders and mysql dump to the new server. I configured local.xml to set the new database settings. When i tried the ipaddress in the browser it took me to the default apache page with magento favicon. So I gave to 777 permissions to all the files and folder (I know its wrong). Now When i try the IPaddress in the brower it redirects me to the old magento server link.Why is this happening?

Thanks

  • Did you clear the cache? Did your change the base url in the database? Does the var folder exist? – Marius Oct 10 '13 at 13:18
  • @Marius cleared the cache folder. I didnt change the base url – Prem Anand Oct 10 '13 at 13:19
  • 1
    Well...change the base url in core_config_data. Search for the records with the value like your old url an change them – Marius Oct 10 '13 at 13:27
  • @Marius can i give ipaddress as value? – Prem Anand Oct 10 '13 at 13:43
  • @Marius I changed still it redirects to the old site – Prem Anand Oct 10 '13 at 13:49
4

I forgot to update the base url.

UPDATE core_config_data SET value="http://newhost.com/" WHERE path="web/unsecure/base_url";
UPDATE core_config_data SET value="https://newhost.com/" WHERE path="web/secure/base_u

replace "newhost.com" with your domain name.

And added in the httpd.conf file

Options Indexes FollowSymLinks

AllowOverride all

inside the directive that says

'<Directory "YOUR DOCUMENT ROOT HERE">'

You can find the httpd.conf file in /etc/httpd/conf/httpd.conf or /etc/apache2/httpd.conf for linux distros.

1

Did you solve your issue?

If not make sure also that public_html/app/etc/local.xml is pointing at the right database Also check your .htaccess for any line concerning your old server, I say this because i had same issue and it was because on root/.htaccess file I had forgoten to edit 'SetEnv PHPRC /home/NEWUSER/public_html'

1

If you tried all steps still it redirects on old IP address and you are using magento 1.9.0.1 than check your database. some time it creates two database one with #-prefix and other one root. Now need to update new IP address in root database

web/secure/base_urel and web/unsecure/base_url. 
0

Delete cache from var/cache directory.

after that run this query in core_config_data table in Magento. After that you'll not get redirect error.

This process ll work for both Magento 1.9.x and Magento 2.x

UPDATE core_config_data SET value="http://example.com/" WHERE path="web/unsecure/base_url"; UPDATE core_config_data SET value="https://example.com/" WHERE path="web/secure/base_url"
0

i had same problem try what i did :

Step 1:

romove cache with SSH :

rm -rf /var/tmp/magento/*

Step 2:

PS: In order to use the Magento Connect Manager you may have to reset the PEAR configuration settings. To do this, simply remove the file downloader/pearlib/pear.ini, and a new one will be created automatically.

Step 3:

RESET FILE PERMISSIONS

To make sure that all javascript files, CSS, and images load correctly, you should reset the file permissions to the recommended settings for your new server.

Run the following commands from your Magento root directory (e.g. public_html):

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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