Title: Image paths when migrating
Last modified: August 30, 2016

---

# Image paths when migrating

 *  Resolved [RuSite](https://wordpress.org/support/users/rusite/)
 * (@rusite)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/image-paths-when-migrating/)
 * How can I migrate to another domain with your plugin?
    The problem is in image
   paths, I inserted some pictures through Rich Text Editor now all pictures are
   broken, because of paths still locating to the old domain.
 * It seems that they are bash64 encoded in DB. How can I change domain in pictures
   path?
 * Now it is:
    “[http://olddomain.com/image.jpg&#8221](http://olddomain.com/image.jpg&#8221);
 * I need:
    “[http://newdomain.com/image.jpg&#8221](http://newdomain.com/image.jpg&#8221);
   or “/image/jpg”
 * [https://wordpress.org/plugins/page-layout-builder/](https://wordpress.org/plugins/page-layout-builder/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [RuSite](https://wordpress.org/support/users/rusite/)
 * (@rusite)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/image-paths-when-migrating/#post-6660166)
 * Just resolved it. There is no way to easily migrate with this plugin.
    I had 
   to write a script to remove domain names from the imagepath manually.
 * You have to do following actions:
    1. Unserialize data from DB in `meta_value`
   field of `wp_postmeta`; 2. Base64 decode of each value; 3. Unserialize each value
   again; 4. Remove domain name using regexp; 5. Serialize it back; 6. Base64 encode
   it back; 7. Serialize to final string to insert into DB;
 * Yeah, that’s pretty much easy, thanks for wasting my time!
 *  Thread Starter [RuSite](https://wordpress.org/support/users/rusite/)
 * (@rusite)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/image-paths-when-migrating/#post-6660167)
 * Closing the topic.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Image paths when migrating’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/page-layout-builder_f8f8f8.svg)
 * [MiniMax - Page Layout Builder](https://wordpress.org/plugins/page-layout-builder/)
 * [Support Threads](https://wordpress.org/support/plugin/page-layout-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/page-layout-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/page-layout-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/page-layout-builder/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [RuSite](https://wordpress.org/support/users/rusite/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/image-paths-when-migrating/#post-6660167)
 * Status: resolved