Title: WordPress image database migration issue
Last modified: June 30, 2024

---

# WordPress image database migration issue

 *  [8BitPixel](https://wordpress.org/support/users/8bitpixel/)
 * (@8bitpixel)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/wordpress-image-database-migration-issue/)
 * I am trying to migrate from a very old CMS to WordPress.
   I have manged to export
   the database and map fields from the old database to a new WordPress Database
   so all the post text has been imported successfully.
 * I have got the file paths of the images from the old database and uploaded the
   images to a folder structure on the server.
   I have managed to rebuild the image
   database so that the uploaded images show in the gallery.
 * The bit I am struggling with is linking the images to the posts.
   I have added
   _thumbnail_id entries to wp_postmeta to link the images the posts but the images
   are not showing up as Featured Images as I’d expect.
 * I have also tried posting revision rows into wp_posts, this hasn’t helped.
 * If I upload an image manually via the front-end/gallery and attach it to the 
   post, then the relevant records are created in the database, if I try to replicate
   this via SQL on the new database, the images are not attached to the posts.
 * What am I missing?
   Thanks

The topic ‘WordPress image database migration issue’ is closed to new replies.

## Tags

 * [featuredimage](https://wordpress.org/support/topic-tag/featuredimage/)
 * [WordPress](https://wordpress.org/support/topic-tag/wordpress/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 2 participants
 * Last reply from: [8BitPixel](https://wordpress.org/support/users/8bitpixel/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/wordpress-image-database-migration-issue/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
