adsense

How to Import Drupal Into WordPress





Import Drupal Content
1. Open your Web browser and start phpMyAdmin or the tool your website uses for database administration. These programs are typically found on your Web-hosting control panel.
2. Click on the 'Import' tab. Upload your Drupal database into the exact same database where WordPress 2.7 is now installed.

3. Visit the 'SQL' tab on your database administration tool to begin pasting your SQL queries. Each query will follow the exact same procedure for copying and pasting.
4. Highlight the text in quotes below.'TRUNCATE TABLE tempdb.wp_comments;TRUNCATE TABLE tempdb.wp_links;TRUNCATE TABLE tempdb.wp_postmeta;TRUNCATE TABLE tempdb.wp_posts;TRUNCATE TABLE tempdb.wp_term_relationships;TRUNCATE TABLE tempdb.wp_term_taxonomy;TRUNCATE TABLE tempdb.wp_terms;'Right-click on the highlighted text and select 'Copy.' Return to the SQL query box. Right-click in the box and select 'Paste' to enter your queries. Click the 'Go' button. Repeat this process for every SQL query.
5. Import all of the taxonomy terms by highlighting the quoted text below.'INSERT INTO tempdb.wp_terms (term_id, `name`, slug, term_group)SELECTd.tid, d.name, REPLACE(LOWER(d.name), ' ', '-'), 0FROM tempdb.term_data dINNER JOIN tempdb.term_hierarchy hUSING(tid);INSERT INTO tempdb.wp_term_taxonomy (term_id, taxonomy, description, parent)SELECTd.tid `term_id`,'category' `taxonomy`,d.description `description`,h.parent `parent`FROM tempdb.term_data dINNER JOIN tempdb.term_hierarchy hUSING(tid);'Paste all of the highlighted text into the query box in your browser.
6. Copy and paste the query below to import all of your Drupal posts directly into WordPress.'INSERT INTOtempdb.wp_posts (id, post_date, post_content, post_title,post_excerpt, post_name, post_modified)SELECT DISTINCTn.nid, FROM_UNIXTIME(created), body, n.title,teaser,REPLACE(REPLACE(REPLACE(REPLACE(LOWER(n.title),' ', '-'),'.', '-'),',', '-'),' ', '-'),FROM_UNIXTIME(changed)FROM tempdb.node n, tempdb.node_revisions rWHERE n.vid = r.vid'
7. Copy and paste the query below into the query box to import each of your Drupal posts to the appropriate category.'INSERT INTO tempdb.wp_term_relationships (object_id, term_taxonomy_id)SELECT nid, tid FROM tempdb.term_node;'
8. Copy and paste the category count updating query below into the query box.'UPDATE wp_term_taxonomy ttSET `count` = (SELECT COUNT(tr.object_id)FROM wp_term_relationships trWHERE tr.term_taxonomy_id = tt.term_taxonomy_id);'
9. Keep unapproved comments hidden to visitors by copying and pasting the below query into the query box.'INSERT INTO tempdb.wp_comments (comment_post_ID, comment_date, comment_content, comment_parent, comment_author, comment_author_email, comment_author_url, comment_approved)SELECT nid, FROM_UNIXTIME(timestamp), comment, thread, name, mail, homepage, status FROM tempdb.comments;'
10. Update the comment counts on individual posts by copying and pasting the below query into the query box.'UPDATE `wp_posts` SET `comment_count` = (SELECT COUNT(`comment_post_id`) FROM `wp_comments` WHERE `wp_posts`.`id` = `wp_comments`.`comment_post_id`);'
11. Correct any line breaks within your content by copying and pasting the query below into the query box.'UPDATE tempdb.wp_posts SET post_content = REPLACE(post_content, '', '');'
12. Correct the image paths for all of the images that will be imported from Drupal. Copy and paste the query below into the query box.'UPDATE tempdb.wp_posts SET post_content = REPLACE(post_content, ''/sites/default/files/', ''/wp-content/uploads/');'
Import Images From Drupal
13. Open your favorite FTP program.
14. Log in to the website that has WordPress installed using the user name and password provided by your Web host.
15. Locate the directory where WordPress is installed. Click on the 'wp-content' folder and then on the 'uploads' folder. Leave this open.
16. Locate the path on your computer where you saved your Drupal website's files.
17. Navigate through your Drupal folders by clicking on the 'sites' folder. Then click on the 'default,' 'files' and 'content' folders.
18. Locate the 'images' folder inside of the 'content' folder.
19. Copy the entire 'images' folder directly into the WordPress 'uploads' folder. Your WordPress installation should now include all of your Drupal website's posts and images.

Comments

0 Responses to "How to Import Drupal Into WordPress"

Post a Comment

Popular Posts

About