Products
GG网络技术分享 2025-03-18 16:15 0
wordpress转/迁移目标为WellCMS。可以使用2中方法导入数据。
在phpmysqladmin中执行以下代码。
#1 .清空数据TRUNCATE table `well_website_thread_tid` ;
TRUNCATE table `well_website_thread` ;
TRUNCATE table `well_website_data` ;
#2. 插入tid
insert into `well_website_thread_tid` (tid,fid,uid)
SELECT `ID`,1,1 FROM wordpress数据库名称.`wp_posts`;
#3. 插入标题
insert into `well_website_thread` (tid, subject,fid )
SELECT `ID`,`post_title`,1 FROM wordpress数据库名称.`wp_posts`;
#4. 插入内容
insert into `well_website_data` (tid, message)
SELECT `ID`, `post_content` FROM wordpress数据库名称.`wp_posts`;
注:其中
well_
,可能是你自己设定的值。该方法优点:速度快。导入数据完整。
缺点:会丢失发布时间、阅读数、tag标签、keywords关键词。
目前WellCMS支持intoDB入库方式,post导入文章ID。所以可以使用采集方式。采集全站后发布到wellcms。使用URL alias / 自定义URL
插件后可实现https://域名/分类/xxx.html。与WP基本保持一致。
该方法优点:使用入库接口,不用操作数据库。流程简单。可以导入文章ID、标题、内容、tag标签、keywords关键词等。
缺点:会丢失发布时间、阅读数。采集原站数据可能会比较慢。tag标签 URL格式会与原来不一致(WellCMS标签格式:https://域名/tag/xxx.html,其中xxx为数字)
Wellcms 子目录伪静态,Nginx下,
在原有根目录伪静态的下面写入以下代码:其中wellcms是子目录名称。
location /wellcms/ {
if (!-e $request_filename) {
rewrite ^((.*)/) /wellcms/index.php last;
}
}Demand feedback