When building a Joomla website, it’s good practice to create the site in a test environment first. Then, when the work is done, you can migrate it to a “live” environment.
Unfortunately, migrating such a site requires work than it should. When you’re also integrating Virtuemart, you can run into even more problems.
The biggest problem is that, unless you’re extremely lucky, all your links will be pointing to the wrong website – and thus, will have to be fixed. Realizing that costed me 30 minutes of my life once. Because, since our “test” server is also hooked up to the internet, the links had once opened the test site, identical to the live site.
Anyway, you’re not hear to read about my mistakes, but to learn from them. Here’s what you should do when your links are “broken” after a Virtuemart integration.
Find the Virtuemart Configuration File: /administrator/components/com_virtuemart/virtuemart.cfg.php
Open the file, and search the following: define(‘url’, ‘the broken url’). Replace the broken URL with the URL of the live site. e.g define(‘url’,’http://www.joomla-and-more.com/virtuemart’)
Edit the URL in the line below as well: e.g define(‘secureurl’,’http://www.joomla-and-more.com/virtuemart’)
Save the changes, and re-upload the file to the server.
Open your website, and look at the Virtuemart links. They should now work properly.