Converting asp.net website to wordpress

Converting asp.net website to wordpress

Situation

Source Version: ASP.NET 4.0

Due to ASP.NET and WordPress are totally different in technology, so converting between them directly is imposible.

First try to setup a theme to accommadate the common parts, e.g. header, menu, and footer. Finally I found that it is not easy to find a suitable theme to do this task, and the page contents would be controlled by different set of stylesheet. Give up!

Then try second method – the final approach.

Key notes

  • ASP.NET page contains special hidden dynamics contents:
    WebResource.axd and ScriptResource.axd files. These are stylesheet and javascripts files that the page rely on during rendering.
  • With php we can include files that contains common contents, like header, menu, footer, sidebar.
    include_once("./includes/header.php");
    include_once("./includes/menu.php");
    include_once("./includes/footer.php");

Steps

  1. Copy the folders that contains static resources to the destination.
  2. Open each page source code from browser: right click > view page source. Save the page source to local, name it with php extension.
  3. Open WebResource.axd and ScriptResource.axd links from source view, then save them to local. Rename and move to coresponding resouce folders of destination server.
  4. Change resource links on page source, remember to change the path based on step 3.
  5. Extract common contents and save to separate files with php extension.
  6. Replace and include the common contents on each page from the files in step 5.
  7. done.

Sites applied

transactrealty.ca leecga.ca

 

336 total views, 1 views today

Author: Albert

Leave a Reply