February 27, 2020

cm-mini

Thinking Magento

Changing Base URL and path of an installation (Moving to Production Server)

When you change the base URL of a Magento installation. You may think that this is a simple thing and forget to do some of the basics.

If you have changed the URL but now receive a weird error that your JS and CSS files are using the absolute path to those files, it will be because you have left on Merge CSS and Merge JS.

So.. What to do to get this right the first time

- In the admin turn off merge CSS and JS in the configuration
- Remove media/css and media/js directories (if exists)
- Check for fooman_speedster.xml in modules/etc and rename to fooman_speedster.disable
- In the admin check your Base URLs on default, website and store level. If you update the base URL, but it's set in the website or store level, it is not going to update.
- If you are locked out of your admin, update Core_Config_Data in the database for base urls (check website and store level)
- Delete var/cache
- Delete var/full_page_cache (Normally for Enterprise)