Joomla

How to: Fix Virtuemart links!

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

  1. Find the Virtuemart Configuration File: /administrator/components/com_virtuemart/virtuemart.cfg.php
  2. 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’)
  3. Edit the URL in the line below as well: e.g define(‘secureurl’,’http://www.joomla-and-more.com/virtuemart’)
  4. Save the changes, and re-upload the file to the server.
  5. Open your website, and look at the Virtuemart links.  They should now work properly. 
Advertisements

Categories: Joomla

Tagged as: , , , , ,

8 replies »

  1. 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.

    Like

      • 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.

        Like