新弄了个独立服务器(mlife.work), 性能杠杠的, 就装个主流的WordPress好了.
可是之前的东西都在typecho上, Google了一下怎么迁移, 还好有好心人写了转换插件, 真是谢谢了.
TypExport
https://github.com/panxianhai/TypExport
在typecho安装这个插件后再后台启动, 然后在管理界面就看到了这个.
导出XML文件后, 在WordPress管理后台-工具-导入-Wordpress, 然后再进去新站点的MySQL替换链接.
登录MySQL服务器修改数据库链接
$mysql -uYourname -pYourpassworld
mysql>show databases; mysql>use wordpress; mysql>show tables; mysql> show tables; +-----------------------+ | Tables_in_wordpress | +-----------------------+ | wp_commentmeta | | wp_comments | | wp_links | | wp_options | | wp_postmeta | | wp_posts | | wp_term_relationships | | wp_term_taxonomy | | wp_terms | | wp_usermeta | | wp_users | +-----------------------+ 11 rows in set (0.00 sec)
mysql> show columns from wp_posts; +-----------------------+---------------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------------+---------------------+------+-----+---------------------+----------------+ | ID | bigint(20) unsigned | NO | PRI | NULL | auto_increment | | post_author | bigint(20) unsigned | NO | MUL | 0 | | | post_date | datetime | NO | | 0000-00-00 00:00:00 | | | post_date_gmt | datetime | NO | | 0000-00-00 00:00:00 | | | post_content | longtext | NO | | NULL | | | post_title | text | NO | | NULL | | | post_excerpt | text | NO | | NULL | | | post_status | varchar(20) | NO | | publish | | | comment_status | varchar(20) | NO | | open | | | ping_status | varchar(20) | NO | | open | | | post_password | varchar(20) | NO | | | | | post_name | varchar(200) | NO | MUL | | | | to_ping | text | NO | | NULL | | | pinged | text | NO | | NULL | | | post_modified | datetime | NO | | 0000-00-00 00:00:00 | | | post_modified_gmt | datetime | NO | | 0000-00-00 00:00:00 | | | post_content_filtered | longtext | NO | | NULL | | | post_parent | bigint(20) unsigned | NO | MUL | 0 | | | guid | varchar(255) | NO | | | | | menu_order | int(11) | NO | | 0 | | | post_type | varchar(20) | NO | MUL | post | | | post_mime_type | varchar(100) | NO | | | | | comment_count | bigint(20) | NO | | 0 | | +-----------------------+---------------------+------+-----+---------------------+----------------+ 23 rows in set (0.00 sec)
然后替换原来的站点链接为新的站点.
mysql>update wp_posts set post_content=replace(post_content,'https://lets.us.to/usr/','http://mlife.work/wp-content/'); Query OK, 34 rows affected (0.05 sec) Rows matched: 114 Changed: 34 Warnings: 0
最后把typecho站点的uploads文件夹合并到wordpress的uploads, 大功告成, 迁移顺利完成.