In WordPress you can save post custom information in the form of post meta.
SO I have saved to input fields value in one meta field in the form of serialized array like this.


So as you can see in the string “i:0;s:81:” this “81” is the length of the next url.
and before transferring the site to new domain I have replaced the url in the database file now the url is changed and the new array is.


So the url is changed but the length number “81” remains the same due to which the unserialize() function is not working properly.

Is there a quick way to solve it by code because I am having around 450 posts and every single post have this meta field.

Read more here: How to unserialize() data string when an url inside it is changed?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: