Migrated My PHP Blog Posts to WordPress Using a Simple phpMyAdmin SQL Query!
I recently successfully migrated my old PHP blog posts into WordPress using a straightforward SQL query in phpMyAdmin. By mapping fields from my legacy articles table to WordPress’s wp_posts (e.g., mapping title to post_title and article to post_content), I streamlined the entire process. Here’s a snippet of the query I used:
INSERT INTO wp_posts (post_title, post_content, post_date, post_date_gmt, post_status, post_author, post_type)
SELECT title, article, articledate, recdate,
CASE WHEN status = 'published' THEN 'publish'
WHEN status = 'draft' THEN 'draft'
ELSE 'pending' END,
1, 'post'
FROM articles;
This method saved me time and ensured a smooth transition. If you're planning a similar migration, give this approach a try!#WordPress #phpMyAdmin #SQL #DatabaseMigration #WebDevelopment