How can I import an existing local Joomla site into a new WebMatrix installation? [Answered]RSS

12 replies

Last post Dec 08, 2010 02:52 PM by F/X

  • How can I import an existing local Joomla site into a new WebMatrix installation?

    Nov 23, 2010 04:48 PM|F/X|LINK


    this is the current situation: I have an existing Joomla installation and site (running on XAMPP on WinSrv 2008) on Computer1, and I want to import the complete site (incl. the admin site) to my new WebMatrix installation on Computer2, which is running Windows 7. I'd like to develop and maintain my site on Computer2 in the future, and publish it to the Web once I'm ready with my development (but not right now).

    Optimally, I could change the underlying database from MySQL (on Computer1) to SQL Express (on Computer2) at the same time... but this is only an option, which I - hopefully - could also realize later after a successfull transfer of the site...

    Could anybody here explain to me (preferrably as step by step instructions) how to accomplish this transfer/import from one machine to the other? I'm totally new to WebMatrix and I'm out of any clue, after doing research for hours...

    Any help is highly appreciated!

    Thanks in advance,

    WebMatrix Import Transfer Joomla

  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Nov 24, 2010 02:53 PM|Yishai G.|LINK

     Hey F/X

     I would start with these first steps, they will not resolve all your issues, but will give you a good head start

    First install Joomla from the gallery, that will bring in all your dependencies and set up a Web Deploy store. (How to below)
    Then copy all your files from the first computer to the other over the site you just created.
    You will now have to export your database from the first computer and import it into the second one/OR Just point your database to the first computer and keep your database running there, both will work. (You can either script it out, or use WebDeploy to sync the databases, let me know if you need more details on how to do that).

    Last thing you will have to do is to look through your Joomla app and see if you are using any specific URL that points to the old computer.

    How to install Joomla:
    Open WebMatrix
    Click on Site From Gallery
    Select Joomla
    Install the app and all the dependencies
    When the parameters page come up, you can choose to hookup to your old database or create a new one on this computer

    Once Joomla is installed:
    Click on the file Navigation bar (bottom left of webmatrix)
    Right click on the site node (the topmost icon in the tree)
    Choose Show In Windows Explorer

    This will open the right folder on computer2 to copy your files to. Be sure to clean out the existing files before you start copying over

    I hope this helps you getting started, ping back if you need any more help


    WebMatrix PHP WebDeploy MySql Joomla

  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Nov 25, 2010 02:43 PM|F/X|LINK

    Hey Yishai,

    first of all - thanks so much for your great and fast answer!

    Your instructions were very clear, thanks for that as well. The only exception to that was your statement "Be sure to clean out the existing files before you start copying over"...

    Now the bad news - I've tried two methods in the meantime, yours and "mine", and both didn't work in terms that I finally get my original site (the one from Computer1) running on Computer2, unfortunately. What I get in both cases is the kind of "standard Joomla site" running on Computer2 (C2), but without any of my modifications as they run on Computer1 (C1).

    Basic situation before beginning was: had Joomla installed in WebMatrix using Site from Gallery - this created a first Joomla site named "joomla_15", with an underlying mysql database named "joomla". 

    What I've then tried so far:

    1. method - "my way"

    1. <div mce_keep="true">Created a copy of the original mysql site database from C1 on (the now existing mysql installation on) C2 using mysqldump; when I restored the database on C2, I used the same database name as on C1. That step worked seamless.</div>
    2. <div mce_keep="true">Copied the complete file structure of my site on C1 to C2 to the (at least I think so) correct place (from C:\apachefriends\xampp\htdocs\<site_name> to C:\Users\franzxk\Documents\My Web Sites\<site_name>)</div>
    3. <div mce_keep="true">Searched all files in the local file structure if there are any references dependent on C1 - only found two paths in the configuration.php file (for logs and tmp files), adapted those to the folder structure on C2</div>
    4. <div mce_keep="true">Created a new Joomla site on C2 named identically to the site's name on C1, using the WebMatrix option "Site From Folder", pointing to the local folder I've created in step 2; ensured that all other parameters I was asked for (such as mysql username and password) are identical to the environment on C1. Also checked the configuration through the Joomla admin site of this new site (such as the database access parameters), all looked fine.</div>
    5. <div mce_keep="true">Restarted the site in WebMatrix</div>
    6. <div mce_keep="true">Reviewed it in IE, just the standard joomla site appeared :-(</div>

    2. Method - your way (after trying my method as described above)

    1. <div mce_keep="true">Deleted the site I created with my method (in order to not generate a conflict with the same site name); used the option to only delete the site, not the content; then renamed the still existing folder C:\Users\franzxk\Documents\My Web Sites\<site_name> to <site_name.old></div>
    2. <div mce_keep="true">Created a new Joomla site using Site from Gallery mode; pointed to the (now existing) local mysql database for my site and again, ensured that all other parameters I was asked for are identical to the environment on C1</div>
    3. <div mce_keep="true">Stopped the newly created site</div>
    4. <div mce_keep="true">Copied the content of the (renamed) folder structure of my first trial from above to the newly created folder, except the configuration.php </div>
    5. <div mce_keep="true">Made all necessary modifications in configuration.php, such as the database access parameters</div>
    6. <div mce_keep="true">Started the site, and reviewed it in IE - again, just the standard joomla site appeared :-(</div>

    Also, when reviewing the system, server and site settings through Joomla's Admin console, all of the plug-in's, modules, etc. I've added on C1 are missing on C2 (although I have to admit, that I've no idea how those are managed by Joomla - i.e., if there are references only outside the mysql database, or also inside the mysql database...

    I also noted, that even not the site template I've setup as default on C1 has been applied to the site on C2...

    Now I'm really out of any ideas what to do to get my original site correctly running on C2...

    I really hope you have further hints on what I probably did wrong, missed, or misunderstood...

    Thanks in advance,


  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Nov 26, 2010 01:40 PM|Yishai G.|LINK

    Hey F/X,

     I think what you might be missing is your database being overridden.

     I would try the following:

    Verify that your site is all setup (and still showing a default Joomla).

    Make sure you know what database it's trying to connect to (an easy way to verify would be to simply remove the database and watch for errors)

    Now exit webmatrix (and all iis express instances in the system tray)

    Dump you database on computer1 and install it on computer2

    Restart webmatrix and try to connect


    I hope this works, I wasn't able to try it, but if it doesn't work, I'll be glad to give it another try when I get back to the office on Monday.


    Happy Thanksgiving



  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Dec 02, 2010 10:23 AM|F/X|LINK

    Hi Yishai,

    I hope you had a great Thanksgiving! 

    Thanks once more! I have to say - you're my hero :-). Once I had re-imported the database things looked much better, now I get the right content displayed.

    However, now I have found another glitch in the site. Not sure if I should open a new thread on this, because I've no idea if that is related to the move of the site or a general problem with running the Joomla-based site on WebMatrix.. I try to describe it now, and if you feel that should be a new thread, just let me know and I'll create one.

    Once I fixed the problem with the database, the following happened: if I open the main page of the site (the "home" page), everything looks fine. But once I open another site through the site's menu structure, the new page gets loaded correctly from the content perspective (the content is loaded and displayed), but the formatting is almost completely lost. IOW, the only formatting that "remains" is that the main menu structure of the site is displayed as a bulleted list, and that the formatting of the text within the article that is shown is correct. Everything else (menu colors/graphics, site background and foreground color, text styles, etc.) is lost.

    After looking a bit deeper into this I found, that there seems to be a problem "in" resp. "around" the index.php, and this happens although the file is identical to the one on C1 (copied it over to C2). This leads me to the assumption, that the real problem is in some file(s) outside index.php, but I've no idea WHERE...

    This is what happens: if I review the content of the HTML code generated by index.php for the main ("Home") page, the following is generated (just an excerpt out of the header):

     <link rel="stylesheet" href="/templates/system/css/system.css" type="text/css" />

    If I than click on one of the menus in the main menu (e.g. "Clubs"), which then leads to a incorrectly displayed page, and review the generated HTML code (the "source") of the page, I find the following (just the excerpt out of the header which relates to the line shown above):

     <link rel="stylesheet" href="/index.php/templates/system/css/system.css" type="text/css" />

    The href text has been prefixed with "/index.php", and this isn't a valid path. This happens for all kind of URI's in the header (I can provide a complete example if that is needed). And, even more strange, if I then select another main menu item (e.g. "Cities") on this incorrectly formatted page, I get this:

     <link rel="stylesheet" href="/index.php/index.php/templates/system/css/system.css" type="text/css" />

    Now, the href URI has been prefixed once more with "/index.php", which is an invalid path again, of course. Jumping back to the Home page through the main menu on this page also doesn't work, because of the same issue.

    I have absolutely no clue what setting/configuration/etc. is causing this...

    Do you have any idea what I can do to prevent this from happening?

    Best regards,


    WebMatrix Joomla index.php

  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Dec 03, 2010 12:52 PM|Yishai G.|LINK

    Hey F/X, I'm not an expert in Joomla, so I'm going to get some help on this and get back to you either myself or one of our other team members. Thanks, Yishai
  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Dec 03, 2010 02:28 PM|ruslany|LINK

    The only thing I can think of that might cause this kind of behavior is the SEO URLs in Joomla. Do you use that? There is a setting there called something similar to "Use mod_rewrite". Try changing that and see if makes any difference.

  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Dec 03, 2010 04:43 PM|F/X|LINK

    Hi Yishai,

    Thanks so much! Your team mate Ruslan already found the main cause for my issue :-). I'll respond to his message next, and hope, he'll have another helpful answer for me as well :-)

    Thanks again!

  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Dec 03, 2010 05:01 PM|F/X|LINK

    Hi Ruslan,

    Thanks so much for your rapid response! And man, you've hit the point on first trial :-)

    That means: I didn't even had the option "Use Apache mod_rewrite" in use. But once I turned off the option "Search Engine Friendly URLs" (set it to No), my site works perfectly! I can easily reproduce the issue now, i.e. if I set "Search Engine Friendly URLs" to Yes, the issue reappears, if I set this option to No, the issue vanishes.

    In order to find out, if that just happens to my specific site, I installed another Joomla site (with sample data) in my WebMatrix installation, and bingo! - I can repro the issue there as well. So it's not specific to my site...

    Well, now the following interesting questions remain:

    1. Why can I use the option "Search Engine Friendly URLs" = Yes on my Apache-based (XAMPP) installation on my Windows Server 2008 computer, but can't use it on my Windows 7 machine using WebMatrix?

    2. What can I do to be able to use SEO-friendly URLs when running my site in WebMatrix, and later at my hosting provider once my site will be ready to be published?

    One idea, out of my brain (after studying many files within my site) - could this issue being related to the rewrite-rules in web.config (which partially look to me like an IIS replacement for the rules specified in htaccess.txt resp. the .htaccess file in a PHP environment)? Or ist there some other file/place where such rewrite rules are in place that I don't know, which cause this problem?

    At least I can continue developing my site in WebMatrix now, as long as I leave "Search Engine Friendly URLs" = No, until the issue has been identified and a solution or workaround can be applied.

    I really hope you have another great answer at hand for me to finally solve this issue :-). And if it turns out to be a bug in WebMatrix, IIS 7.5 Express, or the PHP implementation therein, I hope you can address this to the dev team and hope they'll fix it before RTM.

    Thanks a lot,

    WebMatrix SEO friendly URL search optimization engine

  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Dec 03, 2010 05:36 PM|ruslany|LINK

    You can use Search Engine Friendly URL's on Win7 with IIS or with WebMatrix. Try following the instructions to enable search engine friendly URL's in Joomla on IIS: Note that these are for IIS, not for IIS Express, but they should give you an idea how to do this.

  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Dec 08, 2010 06:36 AM|F/X|LINK

    Hi Ruslan,

    Thanks a lot for this response!

    Well, there is already a web.config in the site's root directory ("C:\Users\franzxk\Documents\My Web Sites\cityguide"), and it contains exactly the rules as described in the article you noted above (the only difference: the values in "rule name" are different - see below; but changing their names to the names as given in the article from above didn't change anything).

    As this web.config file has been generated by WebMatrix, I assume, that the corresponding Microsoft URL Rewrite Module for IIS 7 is already included in the WebMatrix (IIS 7.5 Express) installation, right?

    If not, please let me know, because right now I don't want to take any risk of installing this URL Rewrite Module on top of my WebMatrix installation and causing other problems due to this, just because - for example - a newer version might already exist within IIS 7.5 Express...

    BTW: I also installed another Joomla-Testsite (with the Sample Data) in WebMatrix to verify if this issue appears there as well - and yes, it does (SEF URLs = Yes = page incorrectly formatted; SEF URLs = No = page looks correctly). The web.config file looks identical there as well.

    Here is my complete web.config file content (I hope, it is ok to paste it here this way - I couldn't find a way of attaching a file to my message):

    <?xml version="1.0" encoding="UTF-8"?><configuration>  <system.webServer>    <defaultDocument>      <!-- Set the default document -->      <files>        <remove value="index.php" />        <add value="index.php" />      </files>    </defaultDocument>    <rewrite>      <rules>        <!--  Required for Joomla SEF            Block out any script trying to set a mosConfig value through the URL          Block out any script trying to base64_encode crap to send via URL          Block out any script that includes a <script> tag in URL          Block out any script trying to set a PHP GLOBALS variable via URL          Block out any script trying to modify a _REQUEST variable via URL        -->                <rule name="Imported Rule 1" stopProcessing="true">          <match url="^(.*)$" ignoreCase="false" />          <conditions logicalGrouping="MatchAny">            <add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" ignoreCase="false" />            <add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" ignoreCase="false" />            <add input="{QUERY_STRING}" pattern="(\&lt;|%3C).*script.*(\>|%3E)" />            <add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />            <add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />          </conditions>          <action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />        </rule>        <rule name="Imported Rule 2">          <match url="(.*)" ignoreCase="false" />          <conditions logicalGrouping="MatchAll">            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" />            <add input="{URL}" negate="true" pattern="^/index.php" ignoreCase="false" />            <add input="{URL}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" />          </conditions>          <action type="Rewrite" url="index.php" />        </rule>      </rules>    </rewrite>  </system.webServer>


    Now I'm really curious what's coming next... :-)

    Best regards,

    Url Rewrite SEO friendly URL SEO web.config

  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Dec 08, 2010 01:02 PM|ruslany|LINK

    Have you enabled "Use Apache mod_rewrite" as shown here: ?

  • Re: How can I import an existing local Joomla site into a new WebMatrix installation?

    Dec 08, 2010 02:52 PM|F/X|LINK

    Hey Ruslan,

    you're my hero of the week :-). Enabling "Use Apache mod_rewrite" did the trick - now the site works with the SEF URLs turned on as well!

    It might be helpful for others to update your instructions at (step 6.) to also set "Use Apache mod_rewrite" to "Yes", because the default for this option after the installation of Joomla is on "No". It might also be helpful to explicitly mention, that it is not required to update the htaccess.txt file to .htaccess, because a) the Joomla site is running on IIS - not Apache (just for beginners like me) and b) the SEO rules etc. within the htaccess file are already covered by the web.config file of IIS.

    Thanks so much for your invaluable help and your patience with me! Now I can continue developing my site further on my much more powerful Windows 7 developer machine (compared to the 7 years old slow machine running Windows Server 2008 :-}).

    Best regards,

    Joomla SEO friendly URL SEF mod_rewrite solution