Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save astockwell-ps/3373260 to your computer and use it in GitHub Desktop.
Save astockwell-ps/3373260 to your computer and use it in GitHub Desktop.
MySQL: Add featured image to post (post-thumbnail)
LOCK TABLES `wp_postmeta` WRITE;
/*!40000 ALTER TABLE `wp_postmeta` DISABLE KEYS */;
INSERT INTO `wp_postmeta` (`meta_id`, `post_id`, `meta_key`, `meta_value`)
VALUES
(47059,4635,'_thumbnail_id','4705'),
(47060,4635,'_thumbnail_id','4708');
/*!40000 ALTER TABLE `wp_postmeta` ENABLE KEYS */;
UNLOCK TABLES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment