Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Development/Staging server portability problems
 
stewartc
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-01-09
Durham,.uk / Hamburg, .de
 

Hi,

I’m trying to set up a local version of Magento for develop that mirrors a ‘live’ test version that will hopefully become a live installation in the coming months.

I’m having big trouble trying to get it to ‘forget’ which host it was installed on, for example when I move my development code to the staging server:

1) The admin log-in immediately changes back to the developent URL when I press submit
2) If I view the source of any page there are absolute links to the style-sheets for example referring to the host on which I ran the installer on
3) All links are absolute referring to the original host where the installer was ran

I recursively grep’ed over my installation and the database and removed any references to the installer host viz: cache, sessions and I truncated log_url in the DB. But as soon as I refresh the old references re-appear. I’ve tried deleting all cookies also.

Does anyone have any similar experiences they can share or perhaps you have a strategy for local development/staging/go-live? Ideally I’d like my code in my own svn repo - but what files do I exclude because they are host-specific?

Finally - maybe I missed something basic in the installation - but is is possible not to have absolute URI’s at all?

Thanks for reading, any comments or advice will be greatly appreciated.

Stew

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

If you are using HTTPS then both secure and unsecure base urls are saved in database, you can see them by

select from `core_config_datawhere path like 'web/%/base_url';

If you do not need HTTPS switching, you can remove these values and Magento will autogenerate base urls on the fly.

After changing configuration directly in the database please do not forget to clean the cache if it is enabled.

 
Magento Community Magento Community
Magento Community
Magento Community
 
stewartc
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2008-01-09
Durham,.uk / Hamburg, .de
 

Thank for the speedy reply. I guess I’ll be using HTTPS eventually but I’ll cross that bridge when I come to it.

Stew

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top