4

I Would like to change images url (that was stored as an http IP) and replace it by the https website address.

I already used "better search an replace" in all tables searching for that ip and replaced a lot of url, almost all of them, however the ones in visual composer was not replaced..

for instance, Visual Compose Image:

enter image description here

Maybe these urls are stored somehow in somewhere else? How can I search and replace those URLs?

"Better serach and replace" results.

enter image description here

But there still exists images with the IP instead of DNS.

What I already tried

  • Use the "Better search and replace" plugin as described above and icreased "settings" > "Max Page Size" to the maximum.

  • PS, I searched for fragments of the IP (in case of the dots were stored in a diferent way)

  • I exported the entire web page using the default export-import wordpress tool and did not found the IP.

Daniel Santos
  • 14,328
  • 21
  • 91
  • 174
  • Check @RustyBadRobot [answer](https://stackoverflow.com/a/57575424/1889685). [search-replace-db](http://github.com/interconnectit/search-replace-db) always works for me, even with urls in serialized PHP fields. – Christos Lytras Aug 22 '19 at 15:26

6 Answers6

5

you cannot replace image url from content in visual composer.

Content will stored as encrypted string. Better & replace plugin cannot replace from encrypted string.

You need to do manually.

composer before loaded

Vel
  • 9,027
  • 6
  • 34
  • 66
  • UPDATE: It's possible by encoding the URLs before you try to search and replace them. I used https://meyerweb.com/eric/tools/dencoder/ to encode them. – Maurice Nov 30 '21 at 10:48
2

You're facing that issue because the strings are encoded.

I used this tool to encode my URLs.

Visit the page, encode both URLs and you can paste them to your search and replace tool!

Maurice
  • 141
  • 1
  • 9
0

I always use this and it never fails http://github.com/interconnectit/search-replace-db. Also remember that Visual Composer stores urls encoded so:

186.236.67.36/siatt

would become:

186.236.67.36%2Fsiatt

Vel
  • 9,027
  • 6
  • 34
  • 66
RustyBadRobot
  • 556
  • 3
  • 16
0

You may try below SQL Query in your database it will help you to change the url for all posts and pages

UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'oldsite.com', 'newsite.com');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'oldsite.com', 'newsite.com');
UPDATE wp_posts SET post_excerpt = REPLACE(post_excerpt, 'oldsite.com', 'newsite.com');
UPDATE wp_posts SET guid = REPLACE(guid, 'oldsite.com', 'newsite.com');
Vel
  • 9,027
  • 6
  • 34
  • 66
-1

you just need unchecked the run as dry run to change the url in the database.

you must unchecked this

enter image description here

Vel
  • 9,027
  • 6
  • 34
  • 66
Qonvex620
  • 3,819
  • 1
  • 8
  • 15
-1

I would suggest in this case to try and use plugin that could assist you in changing the URL's even of hardcoded elements, such as "Really Simple SSL" which should not only make the front-end content (if there is a miss-match) load using HTTPS but also the back-end of the wordpress.

Good Luck. If you still continue to have the issue could you use the Chrome bug inspector to show the mixed content URL that is displaying.

Vel
  • 9,027
  • 6
  • 34
  • 66