1

I'm getting many warnings like:

 Mixed Content: The page at 'https://www.example.in/' was loaded over HTTPS, but requested an insecure image 'http://www.example.in/wp-content/uploads/2014/12/logo_250.png'. This content should also be served over HTTPS.

After following SSL breaks customizer: page isn't returned from ajax answer I could fix many warnings.

I've run these commands from mysql:

UPDATE wp_posts SET guid = replace(guid, 'http://www.example.com','https://www.example.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.example.com', 'https://www.example.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.example.com','https://www.example.com');

Now still many images are using http: prefix within the wp_options table in value column.

When I run this the site breaks down though I'm able to get green secured lock in the address bar of browser:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.example.com','https://www.example.com');

Actually in the wp_options there is option_name qode_options_proya which is storing in JSON form. If we change from http to https in this JSON format it is causing some issues. How to resolve it?

  • qode_options_proya is not something native to WordPress. – Max Yudin May 14 '17 at 17:37
  • @MaxYudin wp_options may contain json data which can't be changed using mysql string replace as suggested in many posts – user5858 May 15 '17 at 5:06
1

Yeah you need to update more than just the siteurl values if you wish that every reference (post and attachment included) are updated properly.

And you can't update that with simple SQL queries because you are going to break the serialization of arrays.

The best thing you can do is use Search Replace DB.

Download the script from github, upload it to your server to a subfolder. For instance, https://example.com/searchdb and follow the instructions there.

You simply need to search for http://example.com and replace with https://example.com. But you can search and replace pretty much anything in your database.

Keep in mind that this will perform queries in your database and edit stuff... so you better keep a good backup of your database, in case something goes wrong.

I never had any issues with the script, it works perfectly... but better be safe than sorry.

One last thing... REMEMBER TO DELETE THE SUBFOLDER AFTER USAGE. You don't want the script to be laying around on an open server !

0

You can try this:

 UPDATE `wp_options` SET `option_value` = "https://www.yoursite.com" WHERE `wp_options`.`option_name` = 'siteurl';
0

wp_options option_value contained JSONified value. We can't manually change it.

In the Bridge theme Quode Options I had to again save the logos for the JSON to be updated which worked. Changing the JSON otherwise will simply corrupt it I guess.

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.