Have you ever encountered the frustration of migrating blog posts, and then find out that they are mysteriously hidden? You’re not alone. The good news is that this issue has a simple solution that can save you time and stress. let’s dive into the quick fix down below.
The Problem: Disappearing Posts
Migration of blog posts is a common task we do frequently with almost all projects. One of the issues that we rarely face is you might notice that your post count is correct but none of them are visible.
Upon closer inspection, I am surprised to find that the status of these missing posts are “empty” This means that they are neither published, draft, nor in any recognizable state.
The Solution
Fortunately, there’s no need to panic or spend hours scouring forums for a solution. The fix is simpler than you might think. All you need is access to the WordPress database through PHPMyAdmin and a basic understanding of running SQL queries.
Access PHPMyAdmin: Log in to Kinsta and find the PHPMyAdmin and select the database associated with the website.
Run the SQL Query: In the SQL tab, paste the following query:
UPDATE wp_posts SET post_status = 'publish';
UPDATE wp_posts SET post_status = 'publish' WHERE post_status = 'draft';
Make sure to replace wp_ with the actual database prefix if it’s different.
Execute the Query: After pasting the query, hit the “Go” button to execute it. This will update the status of posts that were previously stuck in an “empty” state and set them to “publish.”
Refresh and Verify: Go back to the WordPress dashboard and refresh the posts page. You should now see the missing articles restored and visible as they were before the migration.
That’s it. hope you find value in it!
Happy Developing! ✌️