Just Custom Fields
[resolved] Custom field image settings dissapear when migrating from dev to live s (2 posts)

  1. fuzzyjared
    Posted 3 years ago #

    When migrating sites between a dev url and a live custom field images or files are gone if you do a find and replace within the sql file.


  2. filippodrudi
    Posted 2 years ago #

    I had the same problem, I managed to figure out what's causing it and how to solve it.

    First of all, the values for your custom fields are store inside your wp_postmeta table, when you have an array as meta_value every string value is listed as the following:


    I presume "s" stands for string, the number is the string length and the final value is your string, in this case an url.
    When you change the url in the string value, like so:


    you end up changing the length of the string as well.
    The stated length (80) and the actual length of the string (83) don't match anymore and that's what's causing the problem here.

    You have to update the numerical value of every url you changed (inside wp_postmeta) in order to get your images and files back.
    Like so:


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Just Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic