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.
Instructions
-
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.
thank you so much… i looked everywhere for this info. Very helpful
Thanks a lot for this … i too didnt find it anywhere..
Very helpful – worked a treat.
You saved me hours of work, thanks for posting your solution. Craig
Thanks, it’s good to see others benefit from tips like this so they don’t have to struggle like I did 😉
I have to say a HUGE thank you. I ran into the problem after a client broke contract and changed his DNS leaving us hanging with a site we couldn’t work on, even after changing the domain.
Hey Drew,
Glad to see the post helped you guys. Of all the Virtuemart problems I’ve encountered, this was one of the most “difficult” ones to solve.
Well, in the end it did fix that problem, but a certain person had apparently been more malicious than we first thought. I ended up having to do a full reinstall so we could actually access the admin section. But still, thank you as now I know how to repair a site move should that occur again.