I am trying to change all images links from http to https, is it possible doing that on a batch query working on the whole database? How?

Moreover my provider made a mess adding an "s" to https getting useless and wrong "httpss" ! So I must revert them from httpss to https.

Please help, many thanks.


4 Answers 4


I should think that you can use phpAdmin Find and Replace where you find "http://www.example.com" and replace with "https://www.example.com". This should handle all internal linking (if blog, then internal linking as well as images, etc.). It would not cover relative addressing like "//www.example.com". In the case of Wordpress, this would be done on the wp_posts table, post_content column.


you could use https://github.com/interconnectit/Search-Replace-DB. This is a great tool to find and replace in db, you just need to copy the srdb folder to root of your site( where your wp-config.php is), then open it :


and then find and replace the strings in your db

for replacing use like this

httpss: ==> https:              //for those which have ss
http:   ==> https:              // for new one



to your replace statement prevent mistake


Do not change these URLs in database. The protocol part should be 'http'. When 'https' request is being made, then first four characters of the URL is replaced by 'https', automatically. If URL from database starts with 'https' then result will be 'httpss'!

  • I acknowledge your good advice, but it's very odd that some "want be" technicians from my provider told me the best way is working directly on the database! I cross my finger waiting them to repair that mess!
    – passegua
    Apr 16, 2017 at 18:41

You can use a very good search/replace plugin that I'm using last year - Better Search Replace

It's working very good. Be sure you'll create the DataBase backup before. I never had problems with this plugin, but you have to be sure, you have the DataBase copy in any case.

  • Many thanks for pointing to that plugin, I'll keep in mind whenever I'll need it.
    – passegua
    Apr 18, 2017 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.