Ways to migrate from movable type to WordPress

Source: Internet
Author: User
Tags log movable type

Movable type and WordPress are the world's most used two blog systems, both of the functions are very powerful, the use of different, of course, the difference between the two is also very large.

Movable type is written in Perl, CGI may be more CPU-intensive, movable type generates a real static HTML file, its URL is friendly to search engines, and static HTML files consume less system resources and can support very large amounts of traffic. Unfortunately it is because of the generation of static HTML files, resulting in the movable type publishing log is slow, each published article to update several pages, the other movable type installation is quite complex, difficult to start.

WordPress is written in PHP, almost exactly and movable type on the contrary, the installation is very simple and rapid, almost 5 minutes can be completely installed, easy to start, WordPress does not generate static HTML files, all logs are saved in the database, So its publish log speed is faster than movable type, but because it is a dynamic page, the default configuration of the search engine is not friendly, but through the urlwrite can simulate static HTML files to achieve the level of the genuine, and also introduced the efficient cache function, Access support for large amounts of data is also getting better.

Since WordPress has always been free, multi-user versions are free, and movable type seems to be moving toward fees as a whole, it seems increasingly popular to migrate personal blogging systems from movable type to wordpresss. I have summarized some methods of data conversion here for reference.

First, the logs are exported to a text file using the export feature of the movable type.

Then, make some configuration of the wordpresss.

Since the previous movable type log has been indexed by search engines such as Google, we can force the WORDPRESSS URL to use the movable type's permalink structure. That is, from the outside to see both have the same URL, will not lose the search engine traffic. In the wordpresss midpoint permalinks set to/archives/%year%/%monthnum%/%postname%.html, because%postname% in wordpresss, use the "-" sign instead of a space, The movable type uses the "_" number, so you need to install a "underscore permalinks Plugin" plug-in in Wordpresss.

This plugin is very simple, first set up a file for underscorepermalinks.php, the contents are as follows:

/*
Plugin Name:underscore permalinks
Plugin uri:http://wordpress.org/#.
Description:converts spaces to underscores when sanitizing post the titles for use in Permalinks. This is handy a for those moving from movable Type who want to maintain the old their style.
version:1.0.1
Author:ryan Boren
Author uri:http://boren.nu/
*/
function Sanitize_title_with_underscores ($title) {
$title = Strtolower ($title);
$title = preg_replace ('/&.+?;/', ', ', $title); Kill entities
$title = Preg_replace ('/[^a-z0-9 _-]/', ', $title);
$title = preg_replace ('/\s+/', ', ', $title);
$title = Str_replace (', ' _ ', $title);
$title = preg_replace (' _+ ', ' _ ', $title);
return $title;
}
Remove_action (' Sanitize_title ', ' sanitize_title_with_dashes ');
Add_action (' Sanitize_title ', ' sanitize_title_with_underscores ');

Then copy the activate to the plugins directory.

Now, you can import the movable type log in WordPress. After the import, the URL in the wordpresss will be exactly the same as the movable type, and a smooth migration is achieved.

Note that WORDPRESSS hosts need to support Urlrewrite to use the above method, otherwise permalink will not be valid.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.