WordPress replacing localhost urls inside base encoded strings saved by theme, plugins etc (Betheme)

For hosting wordpress site from localhost to live server require to change all the localhost urls to the live domain urls. Done and site also loads fine but none of the media items are showing as they are inside base encoded strings.

How to replace urls inside the base encoded strings saved by the theme and other plugins?

In my case i am using BeTheme and visual composer which contains the actual page content and saved base encoded in the db. They contains the hardcoded full urls of a lot of media items.

I took the db dump in a .sql file and find and replaced all localhost to live domain url… But this is where i stuck!

How to fix this?

1.Backup your database(!!!)

2.Create a table with same layout as wp_postmeta:

3.Insert into new table base64_decoded values selected from wp-postmeta

4.Use search-replace plugin in wp to replace “domain.net” with “domain.com” in wp_base64_dec table .

5.Replace the altered columns in the original table:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *