Yesterday in my post about moving your blog to a new domain, I mentioned that there is a problem that presents itself when posts are imported into WordPress 2.5 or later.   A quick search determined that I wasn’t the only one having this problem, so I decided to document how to fix this problem here (or at least how I was able to fix it).

Here are the steps I took to fix the problem with the unresponsive script in the Write panel (requires CPanel/PHPMyAdmin access):

  1. Please make a backup of your database in case you run into any problems.  These are the steps that worked for me to fix the problem, but I can’t guarantee they will work for everyone. 
  2. Login in to your CPanel.   This is usually found at http://yourdomain.com/cpanel/ and usually uses your FTP password.
  3. Access your PHPMyAdmin (in CPanel this is usually found at the bottom of the MySQL Databases page).
  4. Click on the MySQL database you created for your new WordPress installation in the menu on the left.
  5. Click on wp_postmeta in the list of tables on the left.
  6. Click the Browse icon.
  7. Click on the post_id tab once to sort the list from 0 to higher.
  8. Now you’ll need to delete anything with a post_id of 0.  Depending on how many posts were imported, there may be a lot of zeroes.  I had about 600 of them to delete.

The best way to do this is to locate the boxes with “row(s) starting from record #” between them.  In the front box put 100 (or whatever number of your choice) and always put 1 in the right box.   Click Show.  You can use the select all button and verify all of them are zero.   Uncheck any that aren’t zero and click Delete.  Repeat until all zeroes are gone.

Now open your Write panel in your new blog’s dashboard and everything should be good!

Kyle Eslick is WordPress enthusiast who took his passion for WordPress to the next level in 2007 by launching WPHacks.com as a place to share hacks, tutorials, etc. Connect with Kyle on Twitter or Google+!

  1. So that maybe explains why, when I exported and imported some test posts into a demo installation of WordPress, that I was recieving some kind of errors. If I recall rightly, I thought the WP installation had a problem and I just left it because it was a test! :P

    …The demo installation is long gone! LOL

    Nice turotial, very simple and easy to follow!

    Thanks
    Mark

  2. Kyle Eslick says:

    @ Mark – Thanks! I don’t spend much time writing hacks inside CPanel because so many things can go very wrong, but I wanted to get this information out there in case people need it.

    Glad it was easy to follow!

  3. Bryan says:

    I’ve been trying to fix this issue on a friend’s blog for months…just happened to stumble across your fix Kyle.

    Thanks a ton!

  4. jared says:

    here is a fix that is the same concept but run’s a query that delete’s those posts all at once. Much quicker!
    http://wordpress.org/support/topic/168011?replies=7#post-752208