You might ask: "Why migrate from Apache hosting to IIS". You would be right to ask that and my only answer is I have windows hosting...and was saving a few pennies by hosting all my sites on a windows box!
That said....I ended up investing far more time than I had planned! It must be said that modx works better with apache hosting. Modx is an SEO friendly CMS and obviously benefits from being able to re-write urls so easily using the .htaccess file. Unfortunately my host does not run an ISAPI filter on shared hosting to do same.......but you can't have your cake and eat it now....can you.
Ok....so here are the steps I took to move from apache to windows, the problems I encountered and the solutions I found. Many thanks to the good folk on the modx forums for help! I also upgraded to 0.9.2 for good measure ;)
- Backup DB + all site files (site migration 101)
- Created new DB on windows host. This is important as many DB servers do not allow external connections for purposes other than admin (ie phpmyadmin etc).
- Export old DB using phpmyadmin (do not use the modx export as I encountered problems with my EPG2 tables when I used the modx sql file)
- Import old DB into new DB, ensuring the table prefix is the same.
- Upload all site files and change the config.inc.php file to reflect the new database details.
This should get you up and running, ie you should be able to browse your site. Two things to note at this point. If you were re-writing urls....you must disable this now as your in IIS. You can find all the relevant settings in the system_setting table in the DB. The second thing you may notice is that you are unable to log into the manager. When you try and login to the modx manager the page simply refreshes and you are redirected back to the login screen. This problem is caused by the session not getting written to the correct location, I found that in another post on the modx forum. If you add the lines below you can clear the session write path and fix the bug (please note also happened on a fresh install of modx with my host)
- That done I then downloaded a fresh copy of modx 9.2
- I copied these new files over all my old files but kept the config.inc.php (most important).
- I then ran the installer (located in the /install dir)
- Please ensure you choose "upgrade" in the installer and if you have modified any of the core snippets either rename them or do not overwrite them.
ALL DONE!!!!!! That was easy ;)
Write a comment
Required fields are marked with *.
Reply #2 on : Fri September 25, 2009, 13:20:00
Reply #1 on : Tue July 21, 2009, 09:37:48