Can't change Magento base URL, stuck in cache

后端 未结 5 1363
渐次进展
渐次进展 2020-12-06 08:51

I have just installed a live site onto a development domain. I changed the web/unsecure/base_url and web/secure/base_url fields in core_config_data

5条回答
  •  春和景丽
    2020-12-06 08:59

    When you move or change your Magento installation to a new domain name, you need to do make sure of four things:

    1) Replace any instance of the old domain in any files on the server. This can be done on some (if not all) *nix by the following:

     find ./ -type f -exec sed -i ‘s/olddomain/newdomain/’ {} \;
    

    2) Remove the var/cache and var/session files.

    3) Update web/unsecure/base_url and web/secure/base_url in your database. (And any other instance of your domain - normally will not be more)

    4) But ultimately folders require permissions of 775 and files have permissions of at least 664. This can be done with the following *nix commands: (Note: var folder and sub may need higher permissions)

     find . -type d -exec chmod 775 {} ;
     find . -type f -exec chmod 664 {} ;
    

    A little history of how I found this out. Had to move a Magento website from one server to another. This was to test to make sure everything would transfer properly. After taking the hour to mass import the database (~3,970,000 rows - largest database I have seen for any CMS, and I have created/modified home-brew and other common CMSs), I was left with www.domain.com when I wanted developer.domain.com.

提交回复
热议问题