program development

Dedecms to wordpress detailed version, success version, classic version

I have been using dedecms for almost 3 years, until I was linked twice in the last two weeks. The problem is that I don't know how to solve it, and dedecms officials don't fill in [...]

article directories

I have been using dedecms for almost 3 years, until I was blacklisted twice in the last two weeks. The problem is that I don't know how to solve it. Dedecms officials don't fill the loopholes. I'm disappointed. So I decided to switch to another program. After searching for a long time, I found a good program. First, I haven't touched other cms programs. If I switch to other unfamiliar programs, the template will be a problem. Except for dedecms, I am more familiar with wordpress. This blog is built by wordpress. So I decided to change to wordpress. How to change it? I could only ask my wife Du Niang. After Baidu for a long time, I searched it under Google, and the tutorials I saw were the same and very in-depth. I won't post their tutorials here. But I am very grateful to their tutorial, which gave me ideas. Before officially writing, I would like to thank Crifan for his friends here on the road. The tutorial officially begins:

Home page dedecms produces full-site rss. Go to the link: https://pan.baidu.com/s/1mfhl_YO-C_yt5c3HxTLV1A Extract the code: There is a detailed tutorial in the aec6 download file. After making a complete rss, you need to modify rss.htm. The file in the tutorial contains this code {dede: artist row='100' col='1' titlelen='100' orderby='pubdate'}. row=100。First check your own dedecms articles to see how many articles there are in total. The value of r0w must be greater than or equal to the number of articles you have, otherwise some data will not be imported when importing data. After making the entire station's rss, download the website's rss data, http://your dedecms domain name/rss.php. After downloading dedecmsrss, several changes need to be made. In order to test, I opened two website tests, www.diaoyudiao.org is the dedecms website, and www.diaosinanshi2.com is the wordpress test website. Open the rss.php file and replace <rss version="2.0"> with

<rss version=”2.0″
xmlns:excerpt=”http://wordpress.org/export/1.2/excerpt/”
xmlns:content=”http://purl.org/rss/1.0/modules/content/”
xmlns:wfw=”http://wellformedweb.org/CommentAPI/”
xmlns:dc=”http://purl.org/dc/elements/1.1/”
xmlns:wp=”http://wordpress.org/export/1.2/”
>。then

Add the version number of wxr below your<language>zh-cn</language>
<wp:wxr_version>1.2</wp:wxr_version>。I have not studied this version number. If you want to know, click Download and the version number will be found in the exported file. The latest version number of wordpress I use is 1.2. Rss.php will come to an end for now and start torturing wordpress. Empty all records in wp_posts after wordpress is installed. As for why you did this, just do it first. I'll explain it later. After deleting the record. Change the initial value of the increment of the id field under wp_posts. You can use various mysql tools to change the sql file directly. Find a piece of code like this in the sql file

DROP TABLE IF EXISTS `wp_posts`; CREATE TABLE `wp_posts`( `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `post_author` bigint(20) unsigned NOT NULL DEFAULT ‘0’, `post_date` datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’, `post_date_gmt` datetime NOT NULL DEFAULT ‘0000-00-00 00:00: 00’, `post_content` longtext NOT NULL, `post_title` text NOT NULL, `post_excerpt` text NOT NULL, `post_status` varchar(20) NOT NULL DEFAULT ‘publish’,`comment_status` varchar(20) NOT NULL DEFAULT ‘open’, `ping_status` varchar(20) NOT NULL DEFAULT ‘open’, `post_password` varchar(20) NOT NULL DEFAULT ”, `post_name` varchar(200) NOT NULL DEFAULT ”, `to_ping` text NOT NULL, `pinged` text NOT NULL,`post_modified` datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’, `post_modified_gmt` datetime NOT NULL DEFAULT ‘0000-00-00 00:00: 00’, `post_content_filtered` longtext NOT NULL, `post_parent` bigint(20) unsigned NOT NULL DEFAULT ‘0’, `guid` varchar(255) NOT NULL DEFAULT ”, `menu_order` int(11) NOT NULL DEFAULT ‘0’, `post_type` varchar(20) NOT NULL DEFAULT ‘post’, `post_mime_type` varchar(100) NOT NULL DEFAULT ”, `comment_count` bigint(20) NOT NULL DEFAULT ‘0’, PRIMARY KEY (`ID`), KEY `post_name`(`post_name`), KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`), KEY `post_parent` (`post_parent`), KEY `post_author` (`post_author`) ) ENGINE=MyISAM AUTO_INCREMENT=84 DEFAULT CHARSET=utf8; set the auto-increase =84 for the last sentence. The value of 84 is determined by the value of the id of your dedecms article. See what the maximum id of your article is. Then the value of auro-increment must be greater than the value of the maximum id of your dedecms article. Otherwise something will go wrong. Then create a directory of your original dedecms and my original website in your Wordpress. After creation,
Export the content. This is my document. Will be similar to <wp:category><wp:term_id>1</wp:term_id><wp:category_nicename>wangzhan</wp:category_nicename><wp:category_parent></wp:category_parent><wp:cat_name>&lt;! [CDATA[Website]]&gt;</wp:cat_name></wp:category> Copy the classification code to your rss.php. This is after I copy it to rss.php. Then change the<category>website</category> to a Wordpress directory format in each of your items.

<category domain=”category” nicename=”wangzhan”><! [CDATA[website]]&gt;</category>. After replacing it, add a<wp:post_type>post</wp:post_type>at the end. This is the article type. Dear catalog, don't just copy my O. Write whatever your classification is. Remember that every item needs to be changed. Use text tools like word to replace them, and start importing rss.php. Choose the penultimate wordpress and you have to install it for the first time. Click to install and it will be ok. If you encounter any problems during import, please contact me for a private chat. I won't say much here. Effect after import

So far, we have successfully imported the title of the article. Next, import the content of the article.

2. Import full article
The full text of articles in the Dreamweaving database is stored in the body on the dede_addonarticle table. We need to transfer the content of this body to the post_content on the wp_posts table in the Worpress database.

This conversion requires a bridge-that is, dede_archives, that is, the content of the body on dede_addonarticle is first transferred to dede_archives, and then transferred from dede_archives to post_content on wp_posts. The matching points between these two conversions are the article id in Dream Weaving and the article title that has been imported in Wordpress (this is the same as the article title in Dream Weaving).

specific steps are as follows:
Enter phpMyAdmin, add a column to the dede_archives table in the Dream Weaving Database and name it body, and then use the UPDATE command to import the full text (body) on the dede_addonarticle to the body of dede_archives, using the aid on the dede_addonarticle and the id on the dede_archives as the matching points:

  1. UPDATE?` dede_archives`,`dede_addonarticle`
  2. SET?` dede_archives`.` body`=?` dede_addonarticle`.` body`
  3. WHERE?` dede_archives`.` id`?=?` dede_addonarticle`.` aid` ?。After execution, back up dede_archives and import it into the wordpress database. Next, import the entire dede_archives table into the WordPress database so that it is in the same database as wp_posts. Use the UPDATE command again to import the body on dede_archives to post_content on wp_posts, using the article title as the matching point (provided that your article titles are unique):
    1. UPDATE?` wp_posts`,`dede_archives`
    2. SET?` wp_posts`.` post_content`=?` dede_archives`.` body`
    3. WHERE?` wp_posts`.` post_title`?=?` dede_archives`.` title` ? After executing this statement, normally the article in dedecms has been successfully imported.

You can go to my testing website www.diaosinanshi2.com to see the test results. Although the article came out and a friend asked about it, the picture was hung. Check out the picture address. Just put the uploads directory of dedecms directly into the wordpress root directory. All the above content can be found online for reference. The following content is not available on the Internet. Please read it carefully.

Although the articles have been moved over. But the address is wrong. Wouldn't it be sad if the website content and address of the website have been changed all of a sudden? Let's cut to the chase.

Create a field in dede-archives. Field name test type is the same as id.

Then import the contents of id into the test field update dede_archives set test = id

Finally, export dede_archives and import dede_archives. into wordpress.

final performance

UPDATE `wp_posts`,`dede_archives`
SET `wp_posts`.` ID`= `dede_archives`.` test`
WHERE `wp_posts`.` post_title` = `dede_archives`.` title `This code. This code means passing the value of test to the ID.

The article has been resolved at the end. Install the WP No Category Base plug-in. Change the fixed link to./% The article addresses such as category %/% post_id %. html have been consistent.Although China does not care about copyright. Kissing my hand for over two hours. Pro copy paste when reproduced when hanging this link or I turn a circle curse you. There is currently my www.diaosinanshi2.com website did not do pseudo-static, so open the article link is 404. Pro see the tutorial their own toss it.

There is also the possibility that you may read some parts of the tutorial and say something. Mainly for novices to watch... Tell me more in detail, haha..