Change custom field value for all posts using phpmyadmin
-
Hi, each post in my wordpress site has its own thumbnail, to display the thumbnail i use the custom field putting the thumbnail url in the value box.
To keep organised i want to move the thumbnails from the wp-content/uploads folder to a new folder wp-content/thumbnails but i would need to update all my existing posts custom field value to also point to the new location.
Im looking for a query i can run in phpmyadmin to find the text ‘uploads’ and replace it with ‘thumbnails’ in the wp_postmeta table.
This would change existing custom values from ‘mysite.com/wp-content/uploads/postpic.jpg’ to ‘mysite.com/wp-content/thumbnails/postpic.jpg’
I used a similar query once in phpadmin for one of my forums which replaced old smiley code with new smiley code for all the posts so i know its possible but im not sure what query i would use for wordpress.
Many thanks in advance
- The topic ‘Change custom field value for all posts using phpmyadmin’ is closed to new replies.