# Changing BB content, programatically?

**URL:** <https://community.wpbeaverbuilder.com/t/changing-bb-content-programatically/18674>\
**Category:** Developers\
**Created:** [June 20, 2024, 5:22pm UTC](https://community.wpbeaverbuilder.com/t/changing-bb-content-programatically/18674 "2024-06-20T17:22:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dougcassidy](https://community.wpbeaverbuilder.com/user_avatar/community.wpbeaverbuilder.com/dougcassidy/32/670_2.png) [@dougcassidy](https://community.wpbeaverbuilder.com/u/dougcassidy)\
**Post date:** [June 20, 2024, 5:22pm UTC](https://community.wpbeaverbuilder.com/t/changing-bb-content-programatically/18674/1 "2024-06-20T17:22:30Z")

</div>

I’m running a script to change the location of some img files. I’ve got images copied to new dir, img meta updated, etc etc. Even have it looking in the post\_content, to replace any references. This all works, except for BB posts. I see that the content for BB post is in post\_meta, under \_fl\_builder\_data, and that the content is in a serialized array.

I know that in order to update this meta, i’ll need to unserialize, into an array, make my changes in the array, seriazlize, then update. Or, using the wordpress functions:

```auto
$m = get_post_meta($post->ID, '_fl_builder_data');
// make changes
update_post_meta($post->ID, '_fl_builder_data', serialize($m));

```

But, is that it?
