Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Routine to convert custom post meta from old to new value

You can run the following sql queries:

update wp_postmeta set meta_key=replace(meta_key,'MyCustomHeader','_MyCustomHeader') where meta_key like "MyCustomHeader";
update wp_postmeta set meta_key=replace(meta_key,'MyCustomTitle','_MyCustomTitle') where meta_key like "MyCustomTitle";

Related Posts:

  1. Why WordPress choose data serialization over json_encode?
  2. Dealing with Many Meta Values, 30+
  3. What is the most secure way to store post meta data in WP?
  4. How to delete outdated, wrongly sized images in _wp_attachment_metadata?
  5. Meta query interfering with orderby relevance
  6. Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
  7. How to solve slow WordPress site caused by attachment_metadata
  8. Delete all post meta except featured image
  9. Is it possible to store visitors IPs in wp_postmeta table?
  10. Multiple postmeta with same name for one post in wp_postmeta table
  11. Delete all post meta except featured image Using SQL
  12. One post carries 30 postmeta values, is this too much?
  13. delete post meta from db, even if does not exist?
  14. WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
  15. Storing data for a wordpress plugin
  16. Where does the actual data stored by add_post_meta
  17. Structure of postmeta meta_value for woocommerce product download
  18. Saving zero as meta value
  19. Uknown meta entries in wp_postmeta
  20. Does post_meta data need to be unserialzed?
  21. Link image with data from the wpdb
  22. Custom Post Type not showing anything added by code anymore?
  23. Compare User meta_value with Product meta_value
  24. How to save EXIF metadata in WordPress database?
  25. _wp_attachment_metadata is not being added to database when PDF files uploaded
  26. “BS_” rows in postmeta table
  27. Migrating meta_key and meta_value from old theme to new one
  28. Database structure for thousands of posts
  29. How much post meta data is too much?
  30. How do i get value from wp_postmeta?
  31. Recommended Post Structure for DB Storage
  32. SQL query : Select a thumbnail for a media
  33. What is the difference between an ORM and an ODM?
  34. Rename a table in MySQL
  35. How should I tackle –secure-file-priv in MySQL?
  36. Can’t connect to MySQL server on ‘127.0.0.1’ (10061) (2003)
  37. Keeping WP database synced across multiple developers using git
  38. Post meta vs separate database tables
  39. Is it possible to define two databases for one installation?
  40. Connect forms in WP to external database
  41. Hook into $wpdb
  42. How to get site URL if database is disconnected?
  43. Is it wise to delete post revisions and autosaves from database?
  44. Improve or optimize a very slow query
  45. Using two different DB users on one WP install
  46. Usage of Direct Database Call Without Caching Error
  47. Can I transfer a mysql database to another site?
  48. Weird issue with database migration and SSL links
  49. Merge two databases: OLD SITE -> NEW SITE
  50. Backup another database with BackUpWordPress plugin [closed]
  51. Easiest Way to Authenticate WP Users Using an External DB?
  52. How to use a different database to list and manage comments in the backend
  53. How to check if a core update, like 4.9.8 → 5.0, involves a database update (migration)?
  54. Why is it that not all users have a ‘session_tokens’ meta_key record in the usermeta table?
  55. How do I find out the full path of a page’s template?
  56. I need to get an array from the wordpress database
  57. Moving minor updates between local and live sites – just database?
  58. Use mulitple usernames?
  59. Exporting table to csv works in the admin but exports HTML data when used on the front end
  60. wp search-replace (not executing)
  61. How to have an external DB read and get data from my wordpress database
  62. Import users from old WP site to new one
  63. can we add extra table or column in wordpress for adding our data
  64. Changing root password in PHPMyAdmin for WordPress Database when going live
  65. How to properly check if a table exists in WordPress Database using Show Tables Query
  66. Fill custom select field with pages/post titles
  67. Display post number by category
  68. Recovering the table wp_usermeta from users
  69. Copying blog from root to /folder (Not moving)
  70. How to restore an option_value with serialized data from backup data
  71. Replacing javascript link in WordPress database without getting mysql syntax errors
  72. User input to database
  73. What structure and database storage method should I use for temporary storage that may be written concurrently?
  74. how to access 2nd Mysqli Database from different server for wordpress
  75. Error establishing a database connection – WordPress setup, everything else is working
  76. Change user_nickname for author page link
  77. What is recommended data type and encryption type for password in a database
  78. How to map data on CSV to web pages?
  79. Database size for news publishers?
  80. WordPress URL error for links
  81. Search and Replace in Windows XAMPP site
  82. How to get the id of recently registered user from database?
  83. How can i syn wordpress user table with a stand-alone php script?
  84. Cloned site not connecting to database – MAMP
  85. How can we speed up wp_get_nav_menu_items()?
  86. How to use separate database on differrent server with different username and password in wordpress for users data
  87. Generating an HTML table from an array based on dynamic key values
  88. Split posts between databases
  89. Moving Site: Is Re-downloading Files After Changing URLs necessary?
  90. Why are my WordPress post queries so slow?
  91. Moving database from WP 2.6 to 3.5 problem
  92. How do I find posts?
  93. Multi database link and mix and match email alert
  94. Homepage redirects to other site of mine? [closed]
  95. Which is less DB intensive in the loop: custom taxonomies or meta fields?
  96. WordPress, Error when trying to insert data >> Notice: wpdb::prepare was called incorrectly
  97. Sharing plugin tables between 2 sites in the same database
  98. How to monitor database for uptime? [closed]
  99. Find specific text in the database and display the context of where that text is
  100. SEO impact: WP+Next.js hybrid [closed]
Categories Database Tags database, post-meta
Paging in a sidebar mini loop
Multiple RSS feeds scroller in one sidebar

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress