How can I import an existing local Joomla site into a new WebMatrix i...
Last post Dec 08, 2010 02:52 PM by F/X
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,
Nov 24, 2010 02:53 PM|Yishai G.|LINK
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:
Click on Site From Gallery
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
Nov 25, 2010 02:43 PM|F/X|LINK
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"
2. Method - your way (after trying my method as described above)
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,
Nov 26, 2010 01:40 PM|Yishai G.|LINK
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.
Dec 02, 2010 10:23 AM|F/X|LINK
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?
Dec 03, 2010 12:52 PM|Yishai G.|LINK
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.
Dec 03, 2010 04:43 PM|F/X|LINK
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 :-)
Dec 03, 2010 05:01 PM|F/X|LINK
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,
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:
http://learn.iis.net/page.aspx/527/install-joomla-on-iis/. Note that these are for IIS, not for IIS Express, but they should give you an idea how to do this.
Dec 08, 2010 06:36 AM|F/X|LINK
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):
Now I'm really curious what's coming next... :-)
SEO friendly URL
Dec 08, 2010 01:02 PM|ruslany|LINK
Have you enabled "Use Apache mod_rewrite" as shown here:
Dec 08, 2010 02:52 PM|F/X|LINK
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
http://learn.iis.net/page.aspx/527/install-joomla-on-iis/ (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 :-}).
SEO friendly URL