IT Blog

  • Blog
  • Technology
    • Technology
    • Architecture
    • CMS
    • CRM
    • Web
    • DotNET
    • Python
    • Database
    • BI
    • Program Language
  • Users
    • Login
    • Register
    • Forgot Password?
  • ENEN
    • 中文中文
    • ENEN
Experience IT
In a World of Technology, People Make the Difference.
  1. Home
  2. Technology
  3. Program Language
  4. PHP
  5. Converting asp.net website to wordpress

Converting asp.net website to wordpress

2019-11-20 1076 Views 0 Like 0 Comments

Table of Contents

  • Situation
  • Key Points
    • Dynamic Resources
    • Common Areas
  • Steps
    • Sites applied

Situation

Source Version: ASP.NET 4.0

WordPress marketshare has been dramatically increased in recently years. More and more people use WordPress for bloggin or e-commerce applications, and also moving existing site to WordPress to reduce maintenance and SEO cost in the future.

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 Points

Dynamic Resources

ASP.NET page contains special hidden dynamic contents:
WebResource.axd and ScriptResource.axd files. These are stylesheet and javascripts files that the page rely on during rendering.

Common Areas

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

 

Loading

error
fb-share-icon
Tweet
fb-share-icon
IT Team
Author: IT Team

Tags: Blog
Last updated:2019-11-20

IT Team

This person is lazy and left nothing

Like
< Previous
Next >

Comments

Cancel reply
Newest Hotspots Random
Newest Hotspots Random
Rich editor not working Making web page scroll down automatically Getting data from Dapper result All Unicode Chars How to keep and display contact form 7 data Common Regular Expressions
Checks if the remote file exists Moving elements around with jQuery WP UI Design - Language Selection on Menu Bar Set up DKIM to prevent email spoofing on GSuite Page view count Using widget components in any place
Categories
  • Architecture
  • BI
  • C#
  • CSS
  • Database
  • DotNET
  • Hosting
  • HTML
  • JavaScript
  • PHP
  • Program Language
  • Python
  • Security
  • SEO
  • Technology
  • Web
  • Wordpress

COPYRIGHT © 2021 Hostlike IT Blog. All rights reserved.

This site is supported by Hostlike.com