RSS

How to: Fix Virtuemart links!

19 Feb

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

About Steven Zeegers

My business card says IT administrator, but my hobby is running Joomla-and-more.com (Joomla, IT) and Toretto.be (Video games). Gamer when possible, regular found @ the movies.
8 Comments

Posted by on February 19, 2010 in Joomla

 

Tags: , , , , ,

8 Responses to How to: Fix Virtuemart links!

  1. patrick

    January 28, 2011 at 1:36 am

    thank you so much… i looked everywhere for this info. Very helpful

     
  2. amit

    June 19, 2011 at 7:22 am

    Thanks a lot for this … i too didnt find it anywhere..

     
  3. vmbuilder

    August 17, 2011 at 2:33 pm

    Very helpful – worked a treat.

     
  4. Jobumex

    September 9, 2011 at 7:17 am

    You saved me hours of work, thanks for posting your solution. Craig

     
    • Steven Zeegers

      September 9, 2011 at 8:05 am

      Thanks, it’s good to see others benefit from tips like this so they don’t have to struggle like I did ;-)

       
  5. Drew

    October 14, 2011 at 6:57 pm

    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.

     
    • Steven Zeegers

      October 14, 2011 at 7:39 pm

      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.

       
      • Drew

        October 14, 2011 at 8:11 pm

        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.

         

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 466 other followers